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, ws
Fields inherited from interface de.grogra.pf.ui.Panel
DEC_WAIT_CURSOR, DEFAULT_CURSOR, INC_WAIT_CURSOR, INHERIT_CURSOR, PANEL_ID, WAIT_CURSOR
Fields 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 TypeMethodDescriptionvoid
chooseDirectory
(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.void
Push content into the frame (which is a CLITextComponent) Only take String for nowvoid
protected void
Return 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.int
getPanelNb
(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.void
initializeWorkbench
(Workbench workbench) boolean
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() ).void
removePanel
(int panelId) void
removePanel
(String panelId) void
setCursor
(int cursor) void
void
setMenuVisibility
(boolean value) int
showChoiceDialog
(String title, I18NBundle bundle, String keyBase, String[] options) Create a dialog where one of the options get selected.int
showDialog
(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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.grogra.pf.ui.Context
getComponent, getPanel
Methods inherited from interface de.grogra.util.Disposable
dispose
Methods inherited from interface de.grogra.pf.ui.Panel
checkClose, getDecorator, getMenu, getPanelId, initDecorator, initialize, resolve, setContent, setMenu, show
Methods 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:
getContent
in interfacePanel
- Overrides:
getContent
in classCLIPanelSupport
-
setCursor
public void setCursor(int cursor) - Specified by:
setCursor
in interfacePanel
- Overrides:
setCursor
in classCLIPanelSupport
-
getWindow
Description copied from interface:Context
Determines the window of this GUI context.- Specified by:
getWindow
in interfaceContext
- Overrides:
getWindow
in classCLIPanelSupport
- Returns:
- this context's window
-
getWorkbench
Description copied from interface:Context
Determines the workbench of this GUI context.- Specified by:
getWorkbench
in interfaceContext
- Specified by:
getWorkbench
in interfaceWindow
- Overrides:
getWorkbench
in classCLIPanelSupport
- Returns:
- this context's workbench
-
initializeWorkbench
- Specified by:
initializeWorkbench
in 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:
disposeImpl
in classCLIPanelSupport
-
setLayout
-
getLayout
-
setMenuVisibility
public void setMenuVisibility(boolean value) - Specified by:
setMenuVisibility
in 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:
chooseFile
in 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
- : ?? 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:
showChoiceDialog
in 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:
showDialog
in interfaceWindow
-
showInputDialog
- Specified by:
showInputDialog
in interfaceWindow
-
showWaitMessage
- Specified by:
showWaitMessage
in interfaceWindow
-
chooseDirectory
- Specified by:
chooseDirectory
in interfaceWindow
-