java.lang.Object
de.grogra.cli.ui.CLIPanelSupport
de.grogra.cli.ui.CLIWindowSupport
- All Implemented Interfaces:
ExecutableComponent,RegistryContext,Context,Panel,Synchronizer.Callback,Window,Disposable
-
Field Summary
Fields inherited from class de.grogra.cli.ui.CLIPanelSupport
mapProducer, menu, MIN_UNUSED_ACTION, panelId, sync, wsFields inherited from interface de.grogra.pf.ui.Panel
DEC_WAIT_CURSOR, DEFAULT_CURSOR, INC_WAIT_CURSOR, INHERIT_CURSOR, PANEL_ID, WAIT_CURSORFields inherited from interface de.grogra.pf.ui.Window
ADD_FILE, CANCEL_RESULT, ERROR_MESSAGE, INFORMATION_MESSAGE, MAIN_WINDOW_ID, NO_RESULT, OPEN_FILE, PLAIN_MESSAGE, QUESTION_CANCEL_MESSAGE, QUESTION_MESSAGE, RESIZABLE_OK_CANCEL_MESSAGE, RESIZABLE_PLAIN_MESSAGE, SAVE_FILE, WARNING_MESSAGE, YES_OK_RESULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchooseDirectory(String title, File directory, int type, boolean mustExist) chooseFile(String title, File directory, FileFilter[] filters, int type, boolean mustExist, FileFilter selectedFilter) Create a "dialog" (a request in the terminal) to get a path to a file.voidPush content into the frame (which is a CLITextComponent) Only take String for nowvoidprotected voidReturn the frame of the windows, which is a CLITextComponent for the CLIWindowSupport to display output textGet a Panel managed by this window (it has be be opened) from its ID.intgetPanelNb(String panelId) Panel[]getPanels(ObjectToBoolean<Panel> filter) Get all the open panels managed by this window.Determines the window of this GUI context.Determines the workbench of this GUI context.voidinitializeWorkbench(Workbench workbench) booleanCheck if the window is currently displayed (i.e. if its workbench is currently selected) The components also have a visible parameter (get with getVisible() ).voidremovePanel(int panelId) voidremovePanel(String panelId) voidsetCursor(int cursor) voidvoidsetMenuVisibility(boolean value) intshowChoiceDialog(String title, I18NBundle bundle, String keyBase, String[] options) Create a dialog where one of the options get selected.intshowDialog(String title, Object message, int type) showInputDialog(String title, Object message, String initial) showWaitMessage(String toComplete) Methods inherited from class de.grogra.cli.ui.CLIPanelSupport
checkClose, checkClose, configure, dispose, executeCheckClose, getComponent, getDecorator, getMenu, getPanel, getPanelId, getRegistry, getUIPropertyMap, hide, initDecorator, initialize, resolve, run, run, setContent, setMenu, show, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.pf.ui.Context
getComponent, getPanelMethods inherited from interface de.grogra.util.Disposable
disposeMethods inherited from interface de.grogra.pf.ui.Panel
checkClose, getDecorator, getMenu, getPanelId, initDecorator, initialize, resolve, setContent, setMenu, showMethods inherited from interface de.grogra.pf.ui.Window
getUIPropertyMap, hide
-
Constructor Details
-
CLIWindowSupport
-
-
Method Details
-
addPanel
-
removePanel
public void removePanel(int panelId) -
removePanel
-
getPanelNb
-
consoleWrite
Push content into the frame (which is a CLITextComponent) Only take String for now -
consoleWrite
-
getContent
Return the frame of the windows, which is a CLITextComponent for the CLIWindowSupport to display output text- Specified by:
getContentin interfacePanel- Overrides:
getContentin classCLIPanelSupport
-
setCursor
public void setCursor(int cursor) - Specified by:
setCursorin interfacePanel- Overrides:
setCursorin classCLIPanelSupport
-
getWindow
Description copied from interface:ContextDetermines the window of this GUI context.- Specified by:
getWindowin interfaceContext- Overrides:
getWindowin classCLIPanelSupport- Returns:
- this context's window
-
getWorkbench
Description copied from interface:ContextDetermines the workbench of this GUI context.- Specified by:
getWorkbenchin interfaceContext- Specified by:
getWorkbenchin interfaceWindow- Overrides:
getWorkbenchin classCLIPanelSupport- Returns:
- this context's workbench
-
initializeWorkbench
- Specified by:
initializeWorkbenchin interfaceWindow
-
isVisible
public boolean isVisible()Check if the window is currently displayed (i.e. if its workbench is currently selected) The components also have a visible parameter (get with getVisible() ). -
getPanels
Get all the open panels managed by this window. -
getPanel
Get a Panel managed by this window (it has be be opened) from its ID. It open the panel (i.e. commands are now pushed into the panel until it is closed or hided) -
disposeImpl
protected void disposeImpl()- Overrides:
disposeImplin classCLIPanelSupport
-
setLayout
-
getLayout
-
setMenuVisibility
public void setMenuVisibility(boolean value) - Specified by:
setMenuVisibilityin interfaceWindow
-
chooseFile
public FileChooserResult chooseFile(String title, File directory, FileFilter[] filters, int type, boolean mustExist, FileFilter selectedFilter) Create a "dialog" (a request in the terminal) to get a path to a file.- Specified by:
chooseFilein interfaceWindow- Parameters:
title- : the message displayeddirectory- : the base directory for the pathfilters- : the list of accepted filters for the file typetype- : possible types from @link de.grogra.pf.ui.Window types: OPEN_FILE = 0; ADD_FILE = 1; SAVE_FILE = 2;mustExist- : the existance of the file is tested if true and return an error if its not the case.selectedFilter- - the selected file filter typeselectedfilter- : ?? Never used in GroIMP (always set as null) probably the default filter selected in the dialog- Returns:
-
showChoiceDialog
Create a dialog where one of the options get selected. The option selected return its index in the options param.- Specified by:
showChoiceDialogin interfaceWindow- Parameters:
title- not used herebundle- : a bundle from which to load textkeyBase- : the key from the bundle to the message displayedoptions- : an array of options for the user to pick from.
-
showDialog
- Specified by:
showDialogin interfaceWindow
-
showInputDialog
- Specified by:
showInputDialogin interfaceWindow
-
showWaitMessage
- Specified by:
showWaitMessagein interfaceWindow
-
chooseDirectory
- Specified by:
chooseDirectoryin interfaceWindow
-