T
- Type of the data panel of the application.public abstract class GMainFrameAbstract<T extends GDataPanelAbstract> extends GPanel implements GListener
GPanel.Panel, GPanel.ScrollBarVisibility
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GMainFrameAbstract(String title,
T dataPanel,
GContextFileManagement contextFileManagement,
GAboutDialog aboutDialog,
GSaveResults saveResultsDialog,
int dataPanelHeight,
int errConsoleHeight,
int iconSize,
boolean showProgressBar)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addMenuBar(GMenu menu,
int idx)
Method to add a menu to the menu bar
|
void |
addMenuBar(JMenu menu,
int idx)
Method to add a menu to the menu bar
|
void |
after(GEvent eve)
Method managing what occurs after action.
|
void |
before(GEvent event)
Called before the event is processed.
|
protected abstract void |
customPostProcessManagement()
Abstract method where setting customized post process management.
|
protected abstract void |
customPreProcessManagement()
Abstract method where setting customized pre process management.
|
void |
deleteMenuBar(GMenu menu)
Method to delete an item from the menu bar
|
void |
deleteMenuBar(JMenu menu)
Method to delete an item from the menu bar
|
void |
deleteMenuBar(String menu)
Method to delete an item from the menu bar
|
void |
display()
Called when the element is to be displayed, so it can perform the actions required for its display, and
the display of its inmmediate descendants.
|
void |
displayMainFrame()
Display the main frame.
|
void |
generic()
Abstract generic function that need to be implemented by the descendants.
|
T |
getDataPanel()
Get the data panel instance.
|
GTextArea |
getErrConsole()
Method allowing to get the error console.
|
GMenu |
getGMenu(String menu)
Method to get a menu from the menubar
|
GJavaCommandLauncher |
getJavaCommandLauncher()
Get the command launcher instance.
|
GMenuBar |
getMenuBar()
Method to return the menu bar to be called by the main static method.
|
GSaveResults |
getSaveResultsDialog()
Get the save results dialog instance.
|
static boolean |
isDebugMode()
Method to get debug mode.
|
void |
moveMenuBar(GMenu menu,
int idx)
Method to move an item in the menu bar to the selected index
|
void |
moveMenuBar(JMenu menu,
int idx)
Method to move an item in the menu bar to the selected index
|
void |
moveMenuBar(String menu,
int idx)
Method to move an item in the menu bar to the selected index
|
static void |
resetContextFileName(String newName)
Reset the name of the context file (if null, text set to "no context")
|
protected abstract void |
saveFilesManagement()
Abstract method where setting mechanism for result (and context) files
saving.
|
void |
setBackGroundErrConsole(Color color)
Method allowing to set background color of the error console.
|
static void |
setDebugMode(boolean mode)
Method to configure in debug mode or not.
|
protected void |
setDefaultConstraints()
set the defaults constraints
|
void |
setErrConsoleFont(Font errConsoleFont)
Method allowing to set font of the error console.
|
void |
setForeGroundErrConsole(Color color)
Method allowing to set ForeGround color of the error console.
|
void |
setMainFrameMinimumSize(int width,
int height)
Set the minimum size of the main frame.
|
clearConstraint, getClassConstraint, getComponent, getHorizontalScroll, getInnerDescendantClassConstraint, getJPanel, getJScrollPane, getLayoutConstraints, getStringClassConstraint, getVerticalScroll, mainClear, mainDisplay, processMouseWheelEvent, put, setClassConstraint, setColumnConstraints, setConstraint, setHorizontalScroll, setInnerDescendantClassConstraint, setLayoutConstraints, setMargins, setPanelConstraints, setPreferredSize, setRowConstraints, setUnitIncrement, setVerticalScroll, unput
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearInnerDescendantContraint, composeWidgetId, doDisplay, endOfElement, getCommentInConfigFile, getConstraint, getCurrentOperation, getDisplayIndicatorStatus, getDisplayIsModifiedIndicator, getElement, getGClassName, getGPanel, getGParent, getGUnitInConfigFile, getInnerDescendantConstraint, getName, getNameInConfigFile, getOperationSaveValue, getPathInConfigFile, getSimpleWidgetId, getStatus, getStringConstraint, getSubComponent, getWidgetId, handleCopyPasteEvent, handleCopyPasteEvent, handleProcessEventException, isCopyPasteEvent, isEnabled, isForcedStatus, isModified, launchInvalidPositionException, mouseWheelMoved, parseSimpleConstraint, processGEvent, setBusyCursor, setCommentInConfigFile, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDisplayIsModifiedIndicator, setElement, setEnabled, setForcedStatus, setGPanel, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem
public GMainFrameAbstract(String title, T dataPanel, GContextFileManagement contextFileManagement, GAboutDialog aboutDialog, GSaveResults saveResultsDialog, int dataPanelHeight, int errConsoleHeight, int iconSize, boolean showProgressBar)
title
- title of the main frame.dataPanel
- panel where all data needed for the application are
displayed.contextFileManagement
- GFile manager that will be displayed for searching context
files.aboutDialog
- Widget displaying information about the application.saveResultsDialog
- Widget managing the save of the context+results files.dataPanelHeight
- height (in pixels) of the data panel.errConsoleHeight
- height (in pixels) of the error console.iconSize
- size of the icons.showProgressBar
- boolean to decide if a progress bar is displayed.protected void setDefaultConstraints()
GPanel
setDefaultConstraints
in class GPanel
public T getDataPanel()
public GSaveResults getSaveResultsDialog()
public GJavaCommandLauncher getJavaCommandLauncher()
public void displayMainFrame()
public void setMainFrameMinimumSize(int width, int height)
width
- minimum width.height
- minimum height.public void display() throws GException
display
in interface GDisplay
GException
- in case of problem while reading the value from file.public void generic() throws GException
generic
in class GPanel
GException
- in case of problem.public void before(GEvent event) throws GException
before
in interface GListener
event
- event to processed.GException
- in case there is a problem managing the event.public void after(GEvent eve) throws GException
after
in interface GListener
eve
- GENIUS event.GException
- GENIUS exceptionpublic GTextArea getErrConsole()
public void setErrConsoleFont(Font errConsoleFont)
errConsoleFont
- font used for output error console.public void setBackGroundErrConsole(Color color)
color
- color used for output error console.public void setForeGroundErrConsole(Color color)
color
- color used for output error console.public GMenuBar getMenuBar()
public void addMenuBar(GMenu menu, int idx)
menu
- menu to be added to the menubaridx
- index where the menu will be addedpublic void addMenuBar(JMenu menu, int idx)
menu
- menu to be added to the menubaridx
- index where the menu will be addedpublic void moveMenuBar(GMenu menu, int idx)
menu
- menu that will be movedidx
- index where the menu will be movedpublic void moveMenuBar(JMenu menu, int idx)
menu
- menu that will be movedidx
- index where the menu will be movedpublic void moveMenuBar(String menu, int idx)
menu
- menu that will be movedidx
- index where the menu will be movedpublic void deleteMenuBar(GMenu menu)
menu
- menu that will be deletedpublic void deleteMenuBar(JMenu menu)
menu
- menu that will be deletedpublic void deleteMenuBar(String menu)
menu
- menu that will be deletedpublic GMenu getGMenu(String menu)
menu
- menu to be recuperatedprotected abstract void saveFilesManagement() throws GException
GException
- GENIUS exceptionprotected abstract void customPreProcessManagement() throws GFileManipulatorException
GFileManipulatorException
- exception when error after reading context files.protected abstract void customPostProcessManagement()
public static boolean isDebugMode()
public static void setDebugMode(boolean mode)
mode
- debug mode if truepublic static void resetContextFileName(String newName)
newName
- new context nameCopyright © 2024. All rights reserved.