public class GralArea9Window extends java.lang.Object implements GralArea9_ifc
+================================================================================+ | | | + | | | + | | | + | | central working area | other + | any | | list + | list | | + | | | + | | | + | +---------------------------------------------------------------+ | | + | | status or output area + | | + | | + +================================================================================+ +================================================================================+ | | + | | + | | + | | central working area + | any | + | list | + | | + | | + | | + | | + |--------------------------------------------------------------------------------+ | status line + +================================================================================+ +================================================================================+ | | | + | | one | other + | any | panel | panel + | list | | + | | | + | | | + |----------------+---------------------------+-----------------------------------+ | + | input area + |----------------+---------------------------------------------------------------+ | | + | info | status or output area + | area | + | | + +================================================================================+or any other partitioning.
#infoHelp
: Window will be opened with key [F1] or menu help. initially call setHelpBase(String)
,
then call setHelpUrl(String)
respectively set GralWidget.setHtmlHelp(String)
for any widget.
#infoBox
: Window will be opened via menu or on demand if anything should be shown. Fill it with
infoBox. GralInfoBox.setText(CharSequence)
, GralInfoBox.setText(CharSequence, int)
or
GralInfoBox.append(CharSequence)
. The info box should be used for on demand. it will be overridden
and reused if necessary later.
#infoLog
: Window will be opened via menu or on demand if anything should be shown. Fill it with
infoLog.GralInfoBox.append(CharSequence)
.
infoAbout
: Window will be opened with menu about. This box will be filled given with the content from
mainCmd
. MainCmd.addAboutInfo(String)
from the given MainCmd instance for GralArea9Window(MainCmd, GralWindow)
.
Modifier and Type | Class and Description |
---|---|
protected class |
GralArea9Window.GralActionFileOpen
TODO actionFile in user space?
|
Modifier and Type | Field and Description |
---|---|
protected GralUserAction |
actionFile |
protected boolean |
bSetStandardMenus
Set on call of
#setStandardMenus(File) to add in in the graphic thread. |
protected GralPanelContent[][] |
componentFrameArea
All main components of the Display in each FrameArea.
|
protected java.io.File |
currentDirectory
Current Directory for file choosing.
|
protected byte[][][] |
dxyFrameArea
spread of each frame area in x direction.
|
MainCmd |
mainCmd |
protected java.lang.String |
outputArea
Area settings for output.
|
GralTextBox |
outputBox
A Text box which is used for common output.
|
protected GralPanelContent |
outputPanel |
protected java.util.Queue<java.lang.String> |
outputTexts |
protected float |
pixelPerXpercent
Number of pixels per percent unit of size, set if
validateFrameAreas() was called. |
protected float |
pixelPerYpercent
Number of pixels per percent unit of size, set if
validateFrameAreas() was called. |
protected GralTextBox_ifc |
textAreaOutput
If it is set, the writeInfo is redirected to this.
|
static int |
version
Version and History
2015-10-26 Hartmut chg Help in now an integral part of the
GralMng , but invoked here. |
protected GralWindow |
window |
protected byte[] |
xpFrameArea
Position of the FrameArea borders in percent
|
protected java.lang.StringBuffer |
XXXsbWriteInfo
The id of the thread, which created the display.
|
protected byte[] |
ypFrameArea
Position of the FrameArea borders in percent
|
Constructor and Description |
---|
GralArea9Window(MainCmd mainCmd,
GralWindow window) |
Modifier and Type | Method and Description |
---|---|
void |
addFrameArea(int xArea,
int yArea,
int dxArea,
int dyArea,
GralPanelContent component)
Sets a Component into a defined area.
|
void |
addFrameArea(java.lang.String sArea,
GralPanelContent component)
Sets a Panel into a defined area.
|
void |
addMenuBarArea9ItemGThread(java.lang.String name,
java.lang.String sMenuPath,
GralUserAction action)
Deprecated.
|
protected GralPanelContent |
addOutputFrameArea(java.lang.String area) |
protected GralRectangle |
convertArea(java.lang.String area)
Converts a string given are designation to indices.
|
GralUserAction |
getActionAbout()
Returns the standard behavior: opens the help window with its constant text.
|
GralUserAction |
getActionHelp()
Returns the standard behavior: opens the about window with its constant text.
|
GralMng |
getGralMng()
Gets the graphical frame.
|
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 sOutputArea)
Initializes the output area, can be called after construction immediately.
|
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 |
setHelpUrl(java.lang.String url)
For context sensitive help, it assigns an URL to the widget which has the focus gained.
|
void |
setMinMaxSizeArea(java.lang.String sArea,
int yMinUnit,
int yMaxUnit,
int xMinUnit,
int xMaxUnit)
Sets the minimal and maximal size.
|
void |
setStandardMenus(java.io.File openStandardDirectory,
GralUserAction actionFile) |
void |
setStandardMenusGThread(java.io.File openStandardDirectory,
GralUserAction actionFile)
Adds a Menu for file open and save only.
|
protected void |
validateFrameAreas()
Set the bounds of all areas.
|
protected void |
writeDirectly(java.lang.String sInfo,
short kind)
Overloads MainCmd.writeDirectly.
|
void |
XXXsetOutputArea(java.lang.String area)
Sets the output window to a defined area. .
|
protected GralUserAction actionFile
protected boolean bSetStandardMenus
#setStandardMenus(File)
to add in in the graphic thread.protected GralPanelContent[][] componentFrameArea
protected java.io.File currentDirectory
protected byte[][][] dxyFrameArea
protected java.lang.String outputArea
public GralTextBox outputBox
protected GralPanelContent outputPanel
protected java.util.Queue<java.lang.String> outputTexts
protected float pixelPerXpercent
validateFrameAreas()
was called.protected float pixelPerYpercent
validateFrameAreas()
was called.protected GralTextBox_ifc textAreaOutput
public static final int version
GralMng
, but invoked here. This class in not change in functinality.
setHelpBase(String)
used in setHelpUrl(String)
.
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.
setFullScreen(boolean)
setHelpUrl(String)
supports context sensitive help.
getActionAbout()
and getActionAbout()
. This actions
are the standard behavior and opens the sub-windows only. But the user can install a more complex functionality
for example writing a context sensitive help.
initGraphic
was the old initOutputArea, but it does more as only the output area.
Now creation of all necessities of Graphic in this functionality.
protected final GralWindow window
protected byte[] xpFrameArea
protected final java.lang.StringBuffer XXXsbWriteInfo
protected byte[] ypFrameArea
public GralArea9Window(MainCmd mainCmd, GralWindow window)
mainCmd
- Aggregation to a MainCmd implemenation.guiDevice
- The window managerwindow
- The window itself. It doesn't be the primary window but a sub window too.public final void addFrameArea(int xArea, int yArea, int dxArea, int dyArea, GralPanelContent component) throws java.lang.IndexOutOfBoundsException
setFrameAreaBorders(int, int, int, int)
.
It should be called only in the GUI-Thread.addFrameArea
in interface GralArea9_ifc
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.public void addFrameArea(java.lang.String sArea, GralPanelContent component) throws java.lang.IndexOutOfBoundsException
GralArea9_ifc
GralArea9_ifc.setFrameAreaBorders(int, int, int, int)
.
It should be called only in the GUI-Thread.addFrameArea
in interface GralArea9_ifc
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.@Deprecated public void addMenuBarArea9ItemGThread(java.lang.String name, java.lang.String sMenuPath, GralUserAction action)
GralArea9_ifc
addMenuBarArea9ItemGThread
in interface GralArea9_ifc
protected GralPanelContent addOutputFrameArea(java.lang.String area)
protected GralRectangle convertArea(java.lang.String area)
area
- A, B , C for column, 1, 2, 3 for row.public GralUserAction getActionAbout()
getActionAbout
in interface GralArea9_ifc
GralArea9_ifc.getActionAbout()
public GralUserAction getActionHelp()
getActionHelp
in interface GralArea9_ifc
GralArea9_ifc.getActionAbout()
public GralMng getGralMng()
getGralMng
in interface GralArea9_ifc
public MainCmd_ifc getMainCmd()
getMainCmd
in interface GralArea9_ifc
public GralMenu getMenuBar()
GralArea9_ifc
GralWindow.getMenuBar()
.getMenuBar
in interface GralArea9_ifc
public GralTextBox getOutputBox()
GralArea9_ifc
getOutputBox
in interface GralArea9_ifc
public GralPanelContent getOutputPanel()
GralArea9_ifc
getOutputPanel
in interface GralArea9_ifc
public void initGraphic(java.lang.String sOutputArea)
initGraphic
in interface GralArea9_ifc
sOutputArea
- String for example "A3C3". The letter character is the column. The digit is the row.
It is fromTo. The example means the whole bottom area.public GralWindow_ifc mainWindow()
mainWindow
in interface GralArea9_ifc
public void setFrameAreaBorders(int x1p, int x2p, int y1p, int y2p)
+=======+===============+===========+ | | | | +-------+---------------+-----------+ | | | | | | | | +-------+---------------+-----------+ | | | | | | | | +=======+===============+===========+
setFrameAreaBorders
in interface GralArea9_ifc
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.public void setFullScreen(boolean full)
setFullScreen
in interface GralArea9_ifc
public void setHelpBase(java.lang.String path)
GralArea9_ifc
setHelpBase
in interface GralArea9_ifc
path
- An absolute given path on a local file system, or html page in internet.public void setHelpUrl(java.lang.String url)
GralMngApplAdapter_ifc
setHelpUrl
in interface GralMngApplAdapter_ifc
url
- A "file#html.label" or "localdir/file.html#label" which describes the html help url
in an local context. The origin of the url is given with a global context of the help window.
See setHelpBase(String)
deprecated: It is often an absolute path. may be a relative path??
deprecated: If it starts with "+", a base path is used as prefix.public void setMinMaxSizeArea(java.lang.String sArea, int yMinUnit, int yMaxUnit, int xMinUnit, int xMaxUnit) throws java.lang.IndexOutOfBoundsException
GralArea9_ifc
setMinMaxSizeArea
in interface GralArea9_ifc
java.lang.IndexOutOfBoundsException
- if the arguments sArea are false.public final void setStandardMenus(java.io.File openStandardDirectory, GralUserAction actionFile)
public final void setStandardMenusGThread(java.io.File openStandardDirectory, GralUserAction actionFile)
GralArea9_ifc
setStandardMenusGThread
in interface GralArea9_ifc
protected void validateFrameAreas()
GralWindow.getPixelPositionSize()
to get the size of working area of the whole windowprotected void writeDirectly(java.lang.String sInfo, short kind)
public void XXXsetOutputArea(java.lang.String area)
xArea
- 1 to 3 for left, middle, right, See setFrameAreaBorders(int, int, int, int)
yArea
- 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 bottom