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 classa creator ofGuiSwingRootPane, can be obtained bycreator().static classstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected GuiSwingRootPane.WindowCloseActionprotected GuiMappingContextprotected GuiSwingKeyBindingprotected booleanprotected GuiSwingLogManager.GuiSwingLogWindowprotected JMenuBarprotected JMenuprotected GuiSwingPreferencesprotected GuiSwingPreferences.PrefsApplyMenuprotected GuiSwingPrefsApplyOptionsprotected SettingsWindowprotected GuiSwingRootPane.ShowPreferencesActionprotected Stringprotected GuiSwingViewprotected JComponentprotected GuiSwingRootPane.WindowMenuBuilderFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields 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 TypeMethodDescriptionvoidcleanUp()cleaning up the pane and related components.static GuiSwingRootPanestatic GuiSwingRootPanecreator()create and return a creator of root-panegetActionByContext(GuiMappingContext context) getActionByName(String name) static FramegetChildByName(String name) getDescendantByContext(GuiMappingContext context) getDescendantByValue(Object value) getDescendantByValueIf(Predicate<Object> valuePredicate) getTitle()getView()protected voidinit()protected voidprotected voidaccessGuiInitWindowof the type of the context and set preferredSize if it has valid valuesprotected voidprotected voidprotected voidinitLog()protected voidinitMenu()protected voidprotected voidprotected voidprotected GuiSwingLogManagerprotected voidprotected voidprotected voidprotected voidbooleanvoidloadPreferences(GuiPreferences prefs, GuiSwingPrefsApplyOptions options) voidthe convenient method for refreshing the panevoidsavePreferences(GuiPreferences prefs) voidsetApplicationRoot(boolean applicationRoot) voidsetContentPane(JComponent comp) voidsetMenuBar(JMenuBar menuBar) voidvoidstatic GuiSwingLogManagervoidnotify changes of source values to sub-components the pane and update display, byGuiMappingContext.updateSourceFromRoot().voidMethods 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, updateUIMethods 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, validateTreeMethods 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getContextin interfaceGuiSwingPreferences.RootView
-
getViewComponent
- Specified by:
getViewComponentin 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() -
initDefaultSize
protected void initDefaultSize()accessGuiInitWindowof the type of the context and set preferredSize if it has valid values- Since:
- 1.8
-
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:
loadPreferencesin interfaceGuiSwingPreferences.RootView- Parameters:
prefs- the source prefsoptions- options for applying (GuiSwingPrefsApplyOptions.APPLY_OPTIONS_DEFAULTforGuiSwingPreferences.RootView.loadPreferences(GuiPreferences)that are all false)
-
withError
-
savePreferences
- Specified by:
savePreferencesin 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
-