Class GuiSwingActionDefault.ActionResultHandlerEditStarter
java.lang.Object
org.autogui.swing.GuiSwingActionDefault.ActionResultHandlerEditStarter
- All Implemented Interfaces:
GuiSwingAction.ActionResultHandler, GuiSwingElement.FeatureCollection, GuiSwingFeature
- Direct Known Subclasses:
GuiSwingTableColumnCollection.ActionResultHandlerEditStarterForList
- Enclosing class:
GuiSwingActionDefault
public static class GuiSwingActionDefault.ActionResultHandlerEditStarter
extends Object
implements GuiSwingAction.ActionResultHandler
the handler implementation for an edit-action
- Since:
- 1.9
-
Nested Class Summary
Nested classes/interfaces inherited from interface GuiSwingFeature
GuiSwingFeature.TraversalOption, GuiSwingFeature.TraversalPredicate, GuiSwingFeature.TraversalPredicateOnce, GuiSwingFeature.TraversalPredicateOnceContext, GuiSwingFeature.VisitorModifier and TypeInterfaceDescriptionstatic enumstatic interfacestatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected GuiMappingContextprotected Objectprotected GuiMappingContextprotected JFrameprotected GuiReprValue.ObjectSpecifierprotected JComponentprotected GuiSwingRootPaneprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionActionResultHandlerEditStarter(GuiMappingContext actionContext, GuiMappingContext editorContext, JComponent rootContentPane) ActionResultHandlerEditStarter(GuiMappingContext actionContext, GuiMappingContext editorContext, GuiSwingView view) -
Method Summary
Modifier and TypeMethodDescriptionprotected KeyStrokeprotected KeyStrokeaddKeyStroke(String name, KeyStroke stroke) voidfinishEdit(boolean ok) protected voidfinishEditCurrentTarget(boolean ok, Object currentTarget) getFrame()List<?> It returns a list of sub-nodes of the node.protected voidinitButtonPane(JPanel content) protected voidprotected StringkeyStrokeString(KeyStroke stroke) voidfor each component, the method is called before refreshing in order to clear the view-clock.voidrun(GuiSwingAction.ExecutionActionParameters parameters, Object o) protected voidsetupObject(GuiReprValue.ObjectSpecifier objectSpecifier, Object o) protected voidshow(ActionEvent e) voidfor each component, at the end of the process, this method will be calledMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GuiSwingElement.FeatureCollection
getSwingViewSubNodesSameDisplayMethods inherited from interface GuiSwingFeature
addSwingEditFinishHandler, executeContextTask, getPrefsJsonSupported, isSwingEditable, loadSwingPreferences, loadSwingPreferences, refreshByContext, requestSwingViewFocus, saveSwingPreferences, setKeyStrokeString, setPrefsJsonSupported, updateSwingViewSource, updateSwingViewSourceFromRootModifier and TypeMethodDescriptiondefault voidaddSwingEditFinishHandler(Runnable eventHandler) the method is used for table cell-editors, in order to observe the completion of editing.default <RetType> GuiSwingTaskRunner.ContextTaskResult<RetType> executeContextTask(Supplier<RetType> task, Consumer<GuiSwingTaskRunner.ContextTaskResult<RetType>> afterTask) default Objectdefault booleandefault voidthe convient method for loading preferences withGuiSwingPrefsApplyOptions.APPLY_OPTIONS_DEFAULT.default voidloadSwingPreferences(GuiPreferences prefs, GuiSwingPrefsApplyOptions options) a sub-class which wraps another value-pane should overrides the method in order to omit needless value setting it can useGuiSwingView.loadPreferencesDefault(JComponent, GuiPreferences)default voidprepare, clear and update via the contextdefault voiddefault voidonly save the component itself, not including children.default voidsetKeyStrokeString(String keyStrokeString) set the key-stroke info.default voidsetPrefsJsonSupported(Object json) default voidnotifies property update to the component.default voidnotifies property update to the component and enclosing other components.
-
Field Details
-
actionContext
-
editorContext
-
rootContentPane
-
frame
-
rootPane
-
objectSpecifier
-
currentTarget
-
showen
protected boolean showen
-
-
Constructor Details
-
ActionResultHandlerEditStarter
public ActionResultHandlerEditStarter(GuiMappingContext actionContext, GuiMappingContext editorContext, GuiSwingView view) -
ActionResultHandlerEditStarter
public ActionResultHandlerEditStarter(GuiMappingContext actionContext, GuiMappingContext editorContext, JComponent rootContentPane)
-
-
Method Details
-
run
- Specified by:
runin interfaceGuiSwingAction.ActionResultHandler
-
initFrame
protected void initFrame() -
initButtonPane
-
keyStrokeString
-
addKeyStroke
-
addAction
-
setupObject
-
show
-
shutdownSwingView
public void shutdownSwingView()Description copied from interface:GuiSwingFeaturefor each component, at the end of the process, this method will be called- Specified by:
shutdownSwingViewin interfaceGuiSwingFeature
-
finishEdit
public void finishEdit(boolean ok) -
finishEditCurrentTarget
-
getFrame
-
getSwingViewContext
- Specified by:
getSwingViewContextin interfaceGuiSwingFeature
-
getSpecifier
- Specified by:
getSpecifierin interfaceGuiSwingFeature- Returns:
- the specifier for the context value, typically obtained from
GuiSwingView.SpecifierManager
-
prepareForRefresh
public void prepareForRefresh()Description copied from interface:GuiSwingFeaturefor each component, the method is called before refreshing in order to clear the view-clock.- Specified by:
prepareForRefreshin interfaceGuiSwingFeature
-
getSwingViewSubNodes
Description copied from interface:GuiSwingFeatureIt returns a list of sub-nodes of the node.A sub-node is a displayable view under the same window, a displayable view under the different window, or a non-displayable element.
If this is a
Container, it typically returnsContainer.getComponents().A sub-node might have a different context or a shared context with
GuiSwingFeature.getSwingViewContext()of this.- Specified by:
getSwingViewSubNodesin interfaceGuiSwingElement.FeatureCollection- Specified by:
getSwingViewSubNodesin interfaceGuiSwingFeature- Returns:
- a list of sub-nodes
-