java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
org.autogui.swing.GuiSwingRootPane
- All Implemented Interfaces:
ImageObserver
,MenuContainer
,Serializable
,GuiSwingPreferences.RootView
the root-pane for object binding panes.
The pane can be created by createForObject(Object)
, createForObject(Object)
,
or GuiSwingRootPane.GuiSwingRootPaneCreator
obtained by creator()
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
a creator ofGuiSwingRootPane
, can be obtained bycreator()
.static class
static class
static class
static class
static class
static class
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected GuiSwingRootPane.WindowCloseAction
protected GuiMappingContext
protected GuiSwingKeyBinding
protected boolean
protected GuiSwingLogManager.GuiSwingLogWindow
protected JMenuBar
protected JMenu
protected GuiSwingPreferences
protected GuiSwingPreferences.PrefsApplyMenu
protected GuiSwingPrefsApplyOptions
protected SettingsWindow
protected GuiSwingRootPane.ShowPreferencesAction
protected String
protected GuiSwingView
protected JComponent
protected GuiSwingRootPane.WindowMenuBuilder
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionGuiSwingRootPane
(GuiMappingContext context) GuiSwingRootPane
(GuiMappingContext context, GuiSwingView view, GuiSwingKeyBinding keyBinding, boolean logStatus, SettingsWindow settingsWindow) GuiSwingRootPane
(GuiMappingContext context, GuiSwingView view, GuiSwingKeyBinding keyBinding, boolean logStatus, SettingsWindow settingsWindow, GuiSwingPrefsApplyOptions prefsApplyOptions) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanUp()
cleaning up the pane and related components.static GuiSwingRootPane
static GuiSwingRootPane
creator()
create and return a creator of root-panegetActionByContext
(GuiMappingContext context) getActionByName
(String name) static Frame
getChildByName
(String name) getDescendantByContext
(GuiMappingContext context) getDescendantByValue
(Object value) getDescendantByValueIf
(Predicate<Object> valuePredicate) getTitle()
getView()
protected void
init()
protected void
protected void
protected void
protected void
initLog()
protected void
initMenu()
protected void
protected void
protected void
protected GuiSwingLogManager
protected void
protected void
protected void
protected void
boolean
void
loadPreferences
(GuiPreferences prefs, GuiSwingPrefsApplyOptions options) void
the convenient method for refreshing the panevoid
savePreferences
(GuiPreferences prefs) void
setApplicationRoot
(boolean applicationRoot) void
setContentPane
(JComponent comp) void
setMenuBar
(JMenuBar menuBar) void
void
static GuiSwingLogManager
void
notify changes of source values to sub-components the pane and update display, byGuiMappingContext.updateSourceFromRoot()
.void
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.autogui.swing.GuiSwingPreferences.RootView
loadPreferences
-
Field Details
-
context
-
view
-
preferences
-
logWindow
-
logStatus
protected boolean logStatus -
viewComponent
-
objectMenu
-
windowMenuBuilder
-
logPreferencesUpdater
-
fileDialogPreferencesUpdater
-
settingsWindow
-
applicationRoot
protected boolean applicationRoot -
keyBinding
-
title
-
showPreferencesAction
-
prefsApplyMenu
-
closeAction
-
prefsApplyOptions
- Since:
- 1.4
-
-
Constructor Details
-
GuiSwingRootPane
-
GuiSwingRootPane
public GuiSwingRootPane(GuiMappingContext context, GuiSwingView view, GuiSwingKeyBinding keyBinding, boolean logStatus, SettingsWindow settingsWindow) throws HeadlessException - Throws:
HeadlessException
-
GuiSwingRootPane
public GuiSwingRootPane(GuiMappingContext context, GuiSwingView view, GuiSwingKeyBinding keyBinding, boolean logStatus, SettingsWindow settingsWindow, GuiSwingPrefsApplyOptions prefsApplyOptions) throws HeadlessException - Parameters:
context
- the contextview
- the viewkeyBinding
- the key-bindinglogStatus
- the flat for showing log-statussettingsWindow
- the setting windowprefsApplyOptions
- the options for prefs application- Throws:
HeadlessException
- if the runtime is headless- Since:
- 1.4
-
-
Method Details
-
createForObject
- Parameters:
o
- the root bound object- Returns:
- a root-pane with strict member binding
-
createForObjectRelaxed
- Parameters:
o
- the root bound object- Returns:
- a root-pane with relaxed member binding by
GuiSwingRootPane.GuiSwingRootPaneCreator.withTypeBuilderRelaxed()
-
creator
create and return a creator of root-paneGuiSwingRootPane.creator() .withTypeBuilderRelaxed() .create(o);
- Returns:
- a new creator
-
getContext
- Specified by:
getContext
in interfaceGuiSwingPreferences.RootView
-
getViewComponent
- Specified by:
getViewComponent
in interfaceGuiSwingPreferences.RootView
-
init
protected void init() -
initTitle
protected void initTitle() -
initToolTipManager
protected void initToolTipManager() -
initViewComponent
protected void initViewComponent() -
initKeyBinding
protected void initKeyBinding() -
initViewComponentSet
protected void initViewComponentSet() -
initPrefs
protected void initPrefs() -
initMenu
protected void initMenu() -
setupObjectMenu
public void setupObjectMenu() -
initLog
protected void initLog() -
initSwingLogManager
-
updateSwingLogManager
-
initFileDialogPrefsUpdater
protected void initFileDialogPrefsUpdater() -
initContextUpdate
protected void initContextUpdate() -
initPrefsLoad
protected void initPrefsLoad() -
initSettingWindow
protected void initSettingWindow() -
setTitle
-
getTitle
-
setMenuBar
-
getMenuBar
-
setContentPane
-
getContentPane
-
getView
-
getLogWindow
-
getObjectMenu
-
getWindowMenuBuilder
-
getLogPreferencesUpdater
-
getFileDialogPreferencesUpdater
-
getSettingsWindow
-
getKeyBinding
-
isApplicationRoot
public boolean isApplicationRoot() -
setApplicationRoot
public void setApplicationRoot(boolean applicationRoot) -
getPrefsApplyOptions
- Returns:
- options
- Since:
- 1.4
-
cleanUp
public void cleanUp()cleaning up the pane and related components. the owner window should call the method before closing (disposing) the window.The method does not intend to reuse the pane after cleaning up.
-
getPreferences
-
loadPreferences
- Specified by:
loadPreferences
in interfaceGuiSwingPreferences.RootView
- Parameters:
prefs
- the source prefsoptions
- options for applying (GuiSwingPrefsApplyOptions.APPLY_OPTIONS_DEFAULT
forGuiSwingPreferences.RootView.loadPreferences(GuiPreferences)
that are all false)
-
withError
-
savePreferences
- Specified by:
savePreferences
in interfaceGuiSwingPreferences.RootView
-
getViewValuePane
-
getDescendantByContext
- Parameters:
context
- the searched context- Returns:
- a descendant value pane holding the context, or null. wrappers which have the same context are avoided.
-
getDescendantByValue
- Parameters:
value
- the searched value- Returns:
- a descendant value pane holding the value, or null. wrappers holding the same context are avoided.
-
getDescendantByValueIf
- Parameters:
valuePredicate
- the condition holds the searched value- Returns:
- a first descendant value pane holding a value matched by the predicate, or null. wrappers holding the same context are avoided.
-
getChildByName
- Parameters:
name
- the searched context name- Returns:
- a child (or descendant for wrappers) value pane holding the named context, or null. wrappers holding the same context are avoided.
-
getActionByName
-
getActionByContext
-
getDescendantActionByContext
public GuiSwingActionDefault.ExecutionAction getDescendantActionByContext(GuiMappingContext context) -
updateSwingViewSourceFromRoot
public void updateSwingViewSourceFromRoot()notify changes of source values to sub-components the pane and update display, byGuiMappingContext.updateSourceFromRoot()
.- Since:
- 1.1
-
refreshByContext
public void refreshByContext()the convenient method for refreshing the pane- Since:
- 1.5
-
getActiveFrame
-