public abstract class GPanel extends GComponent implements GDisplay
Modifier and Type | Class and Description |
---|---|
class |
GPanel.Panel
Extended class of a JPanel containing a list of components to display.
|
static class |
GPanel.ScrollBarVisibility
Enumerate to list the possible visibilities for a scroll bar.
|
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.Operation
NAME_ATTRIBUTE
Constructor and Description |
---|
GPanel()
Default Constructor
|
GPanel(String widgetId)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearConstraint()
Clears the constraint for the component.
|
abstract void |
generic()
Abstract generic function that need to be implemented by the descendants.
|
GConstraint |
getClassConstraint(Class<?> className)
Get the class constraint for the widgets of a certain class included into
this panel.
|
Component |
getComponent()
Returns the low level Swing Component encapsulated by the class if any, otherwise returns
null.
|
GPanel.ScrollBarVisibility |
getHorizontalScroll()
Gets the horizontal scroll bar policy applying to the panel.
|
GConstraint |
getInnerDescendantClassConstraint(Class<?> ownerClass,
Integer... positionArray)
Get the class constraint applying to all the subcomponents in a given
position of the widgets of a certain class included into this panel.
|
JPanel |
getJPanel()
Return the JPanel associated with the GPanel.
|
JScrollPane |
getJScrollPane()
Return the JSCrollPane associated with the panel.
|
Object |
getLayoutConstraints()
Get the layout constraints.
|
String |
getStringClassConstraint(String defaultConstraint,
Class<?> ownerClass,
Integer... positionArray)
Get the constraint applying to a certain component.
|
GPanel.ScrollBarVisibility |
getVerticalScroll()
Gets the vertical scroll bar policy applying to the panel.
|
void |
mainClear()
Method to refresh the contents of the GPanel.
|
void |
mainDisplay()
Method to refresh the contents of the GPanel.
|
void |
processMouseWheelEvent(MouseWheelEvent e)
Process mouse wheel event.
|
void |
put(GComponent component)
Depending on the current on-going operation (Display, Read or Write) the
component is displayed, or read/written to the configuration file.
|
void |
setClassConstraint(GConstraint constraint,
Class<?> className)
Set the class constraint for the widgets of a certain class included into
this panel.
|
void |
setColumnConstraints(Object object)
Set the column constraints.
|
void |
setConstraint(GConstraint constraint)
Set the constraint for the component.
|
protected void |
setDefaultConstraints()
set the defaults constraints
|
void |
setHorizontalScroll(GPanel.ScrollBarVisibility visibility)
Sets an horizontal scroll bar to the panel.
|
void |
setInnerDescendantClassConstraint(GConstraint constraint,
Class<?> ownerClass,
Integer... positionArray)
Set the class constraint for all the given subcomponents of the widgets
of a certain class included into this panel.
|
void |
setLayoutConstraints(Object object)
Set the layout constraints.
|
void |
setMargins(int top,
int left,
int bottom,
int right)
Set margins.
|
protected void |
setPanelConstraints()
Set panel constraints.
|
void |
setPreferredSize(int width,
int height)
Set preferred size for the panel.
|
void |
setRowConstraints(Object object)
Set the row constraints.
|
void |
setUnitIncrement()
Set unit increment
|
void |
setVerticalScroll(GPanel.ScrollBarVisibility visibility)
Sets an vertical scroll bar to the panel.
|
void |
unput(GComponent component)
Unput component.
|
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 GPanel()
public GPanel(String widgetId)
widgetId
- widget identifier.public void processMouseWheelEvent(MouseWheelEvent e)
processMouseWheelEvent
in class GComponent
e
- event to processpublic final void setUnitIncrement()
protected final void setPanelConstraints()
protected void setDefaultConstraints()
setDefaultConstraints
in class GComponent
public void setLayoutConstraints(Object object)
object
- for which the constraints are setpublic void setMargins(int top, int left, int bottom, int right)
top
- top marginleft
- left marginbottom
- bottom marginright
- right marginpublic Object getLayoutConstraints()
public void setColumnConstraints(Object object)
object
- for which the constraints are setpublic void setRowConstraints(Object object)
object
- for which the constraints are setpublic void setInnerDescendantClassConstraint(GConstraint constraint, Class<?> ownerClass, Integer... positionArray)
constraint
- constraint to set to the owner class subcomponent.ownerClass
- name of the "owner" class whose subcomponents will be affected
by the constraint.positionArray
- array representing the position of the component into the
owner class that will receive the constraint.public void setClassConstraint(GConstraint constraint, Class<?> className)
constraint
- constraint to set to all instances of the class in the current
panel.className
- name of the class whose instances will be affected by the
constraint.public GConstraint getInnerDescendantClassConstraint(Class<?> ownerClass, Integer... positionArray)
ownerClass
- name of the "owner" class whose subcomponents constraint is
searched for.positionArray
- array representing the position of the subcomponent into the
owner class.public GConstraint getClassConstraint(Class<?> className)
className
- name of the "owner" class whose instances constraint is
searched for.public String getStringClassConstraint(String defaultConstraint, Class<?> ownerClass, Integer... positionArray)
defaultConstraint
- applying in case of null class constraint.ownerClass
- the owner class whose constraint is to be searched for.positionArray
- array representing the position into the owner class of the
component.public void unput(GComponent component)
component
- componentpublic void put(GComponent component) throws GException
component
- to display, read or write.GException
- In case of problem while reading or writing.public Component getComponent()
GComponent
getComponent
in class GComponent
public JPanel getJPanel()
public JScrollPane getJScrollPane()
public void setHorizontalScroll(GPanel.ScrollBarVisibility visibility)
visibility
- for the scroll bar: GPanel.ScrollBarVisibility.ALLWAYS
,GPanel.ScrollBarVisibility.NEVER
,GPanel.ScrollBarVisibility.AS_NEEDED
public GPanel.ScrollBarVisibility getHorizontalScroll()
GPanel.ScrollBarVisibility.ALLWAYS
,GPanel.ScrollBarVisibility.NEVER
,GPanel.ScrollBarVisibility.AS_NEEDED
public void setVerticalScroll(GPanel.ScrollBarVisibility visibility)
visibility
- for the scroll bar: GPanel.ScrollBarVisibility.ALLWAYS
,GPanel.ScrollBarVisibility.NEVER
,GPanel.ScrollBarVisibility.AS_NEEDED
public GPanel.ScrollBarVisibility getVerticalScroll()
GPanel.ScrollBarVisibility.ALLWAYS
,GPanel.ScrollBarVisibility.NEVER
,GPanel.ScrollBarVisibility.AS_NEEDED
public void setPreferredSize(int width, int height)
width
- preferred width for the panel.height
- preferred height for the panel.public abstract void generic() throws GException
GException
- in case of problem.public void mainDisplay() throws GException
GException
- if a child component raises an exception.public void mainClear() throws GException
GException
- if a child component raises an exception.public void clearConstraint()
clearConstraint
in class GComponent
public void setConstraint(GConstraint constraint)
setConstraint
in class GComponent
constraint
- constraint to set for the component.Copyright © 2024. All rights reserved.