public interface GralArea9_ifc extends GralMngApplAdapter_ifc
+---------+-------------------+--------------+ | | | | +---------+-------------------+--------------+ | | | | | | | | +---------+-------------------+--------------+ | | | | +---------+-------------------+--------------+Example for combined areas:
+---------+-------------------+--------------+ | select | | +---------+ edit area | | | | | broswing| | + +-------------------+--------------+ | | output area | status | +---------+-------------------+--------------+Usual an application needs only a few but stable areas.
Modifier and Type | Field and Description |
---|---|
static int |
version
Version history:
2012-05-17 Hartmut new:
setMinMaxSizeArea(String, int, int, int, int) : The size can be given
with gral units, as min, max or absolute (min, max are equal). |
Modifier and Type | Method and Description |
---|---|
void |
addFrameArea(int xArea,
int yArea,
int dxArea,
int dyArea,
GralPanelContent component)
Deprecated.
|
void |
addFrameArea(java.lang.String sArea,
GralPanelContent component)
Sets a Panel into a defined area.
|
void |
addMenuBarArea9ItemGThread(java.lang.String nameWidg,
java.lang.String sMenuPath,
GralUserAction action)
Deprecated.
|
GralUserAction |
getActionAbout()
Returns the prepared action about which opens the help window.
|
GralUserAction |
getActionHelp()
Returns the prepared action help which opens the help window.
|
GralMng |
getGralMng() |
MainCmd_ifc |
getMainCmd() |
GralMenu |
getMenuBar()
Gets the menu bar for the window, see
GralWindow.getMenuBar() . |
GralTextBox |
getOutputBox()
Returns the text box which is used as output box for common messages of the application.
|
GralPanelContent |
getOutputPanel()
Returns the outputArea, which was created by the graphic thread.
|
void |
initGraphic(java.lang.String outputArea)
Initializes the graphic of the Area9-Window.
|
GralWindow_ifc |
mainWindow() |
void |
setFrameAreaBorders(int x1p,
int x2p,
int y1p,
int y2p)
Sets the divisions of the frame.
|
void |
setFullScreen(boolean full) |
void |
setHelpBase(java.lang.String path)
Set a path which is used as help url base path.
|
void |
setMinMaxSizeArea(java.lang.String sArea,
int yMinUnit,
int yMaxUnit,
int xMinUnit,
int xMaxUnit)
Sets the minimal and maximal size.
|
void |
setStandardMenusGThread(java.io.File openStandardDirectory,
GralUserAction actionFile)
Adds a Menu for file open and save only.
|
setHelpUrl
static final int version
setMinMaxSizeArea(String, int, int, int, int)
: The size can be given
with gral units, as min, max or absolute (min, max are equal). The size of a area border can be changed on runtime.
addFrameArea(String, GralPanelContent)
now with String designation of area.
It should be used instead designation with 4 integers in range 1..3.
GralMngApplAdapter_ifc
initGraphic(String)
instead initOutputArea().
getActionAbout()
and getActionAbout()
to support menu setting by user
MainCmdSwt
and maybe the adequate Swing class base on MainCmd
.
Using this change only this interface is necessary for applications to use MainCmdSwt
or adequate Swing
mainGuiSwt.MainCmdSwt
and MainCmdSwing
exists.
The interface should combine the usage of both.
Second approach is the documentation of the concept of the 9 areas in a non-implementing class.
void initGraphic(java.lang.String outputArea)
GralArea9Window
the working is done in the graphic thread. The caller thread waits for success in this method.
The following actions are done:
GralGraphicTimeOrder
GralArea9Window.writeOutputTextDirectly
which transfers
text lines stored in GralArea9Window.outputTexts
to the output area.
outputArea
- Two letter combination A1..C3 for horizontal and vertical area.
A..C is left to right, 1..3 is top to bottom.
The first combination is the top left area for output,
the second combination is the bottom right area.
The output area can use more as one basic areas.
For example "A3C3" means that the output area uses the full bottom part of window.
For example "B2C3" means an area consist of 4 basic areas right bottom.@Deprecated void addMenuBarArea9ItemGThread(java.lang.String nameWidg, java.lang.String sMenuPath, GralUserAction action)
getMenuBar()
and then GralMenu.addMenuItem(String, String, GralUserAction)
GralMenu getMenuBar()
GralWindow.getMenuBar()
.void setStandardMenusGThread(java.io.File openStandardDirectory, GralUserAction actionFile)
openStandardDirectory
- actionFile
- GralPanelContent getOutputPanel()
void setFrameAreaBorders(int x1p, int x2p, int y1p, int y2p)
+=======+===============+===========+ | | | | +-------+---------------+-----------+ | | | | | | | | +-------+---------------+-----------+ | | | | | | | | +=======+===============+===========+
x1p
- percent from left for first vertical divide line.x2p
- percent from left for second vertical divide line.y1p
- percent from left for first horizontal divide line.y2p
- percent from left for first horizontal divide line.void addFrameArea(java.lang.String sArea, GralPanelContent component) throws java.lang.IndexOutOfBoundsException
setFrameAreaBorders(int, int, int, int)
.
It should be called only in the GUI-Thread.sArea
- Area identifcation, e.g. "B3C3" where alpha-char A..C is column, numeric char 1..3 is row.
If a range is given, the whole area of that areas is used.component
- The component.java.lang.IndexOutOfBoundsException
- if the arguments are false or the area is occupied already.void setMinMaxSizeArea(java.lang.String sArea, int yMinUnit, int yMaxUnit, int xMinUnit, int xMaxUnit) throws java.lang.IndexOutOfBoundsException
java.lang.IndexOutOfBoundsException
- if the arguments sArea are false.@Deprecated void addFrameArea(int xArea, int yArea, int dxArea, int dyArea, GralPanelContent component) throws java.lang.IndexOutOfBoundsException
addFrameArea(String, GralPanelContent)
.setFrameAreaBorders(int, int, int, int)
.
It should be called only in the GUI-Thread.xArea
- 1 to 3 for left, middle, rightyArea
- 1 to 3 for top, middle, bottomdxArea
- 1 to 3 for 1 field to 3 fields to right.dyArea
- 1 to 3 for 1 field to 3 field to bottomcomponent
- The component.java.lang.IndexOutOfBoundsException
- if the arguments are false or the area is occupied already.GralTextBox getOutputBox()
void setFullScreen(boolean full)
GralMng getGralMng()
GralUserAction getActionHelp()
addMenuBarArea9ItemGThread(String, String, GralUserAction)
to install the help menu.GralUserAction getActionAbout()
addMenuBarArea9ItemGThread(String, String, GralUserAction)
to install the help menu.GralWindow_ifc mainWindow()
MainCmd_ifc getMainCmd()
void setHelpBase(java.lang.String path)
path
- An absolute given path on a local file system, or html page in internet.