public class GFrame extends GComponent implements WindowListener
display(), and its minimum size can be fixed with method
setMinimumSize(Dimension). By default, the windows dimensions are modifiable. *| Modifier and Type | Class and Description |
|---|---|
static class |
GFrame.CloseAction
Enumerated listing the possible behaviors of the GFrame when the window is closed by the window
manager:
DoNothingOnClose: Don't do anything; require the program to handle the operation in the before or after
methods.
|
GComponent.CopyPasteOperation, GComponent.DisplayIndicatorStatus, GComponent.ItemType, GComponent.OperationNAME_ATTRIBUTE| Constructor and Description |
|---|
GFrame(String title,
GPanel panel)
Constructor.
|
GFrame(String title,
GPanel panel,
GMenuBar menuBar)
Constructor.
|
GFrame(String widgetId,
String title,
GPanel panel)
Constructor.
|
GFrame(String widgetId,
String title,
GPanel panel,
GMenuBar menuBar)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
display()
Display the frame in the screen.
|
void |
dispose()
Close the frame.
|
Component |
getComponent()
Returns the low level Swing Component encapsulated by the class if any, otherwise returns
null.
|
JFrame |
getJFrame()
Return the JFrame associated with the GFrame.
|
void |
setDefaultCloseOperation(GFrame.CloseAction action)
Set the default action for the close operation.
|
void |
setGMenuBar(GMenuBar menuBar)
Set the menuBar to the frame.
|
void |
setGPanel(GPanel panel)
Set the panel in the container area.
|
void |
setMaximumSize(Dimension d)
Set the maximum size of the frame.
|
void |
setMinimumSize(Dimension d)
Set the minimum size of the frame.
|
void |
setPreferredSize(Dimension d)
Set the preferred size of the frame.
|
void |
windowActivated(WindowEvent e) |
void |
windowClosed(WindowEvent e) |
void |
windowClosing(WindowEvent e) |
void |
windowDeactivated(WindowEvent e) |
void |
windowDeiconified(WindowEvent e) |
void |
windowIconified(WindowEvent e) |
void |
windowOpened(WindowEvent e) |
activateConstraintsByType, attachCopyPasteMenu, attachCopyPasteMenu, beginOfElement, beginOfElement, beginOfElement, beginOfElement, clearAllInnerDescendantConstraint, clearConstraint, 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, processMouseWheelEvent, setBusyCursor, setCommentInConfigFile, setConstraint, setCopyPasteMenuEnabled, setCurrentOperation, setDataForConstraintsByType, setDefaultConstraints, setDisplayIsModifiedIndicator, setElement, setEnabled, setForcedStatus, setGParent, setGUnitInConfigFile, setInnerDescendantConstraint, setName, setNameAndCommentInConfigFile, setNameInConfigFile, setPathInConfigFile, setStatus, setStringConstraint, setToolTipText, setWidgetId, setWidth, setWindowBusyCursor, updateIsModifiedIndicator, writeCollection, writeCollection, writeCollection, writeCollection, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItem, writeConfigItempublic GFrame(String title, GPanel panel)
title - to be displayed in the frame.panel - to be displayed in the container area.public GFrame(String title, GPanel panel, GMenuBar menuBar)
title - to be displayed in the frame.panel - to be displayed in the container area.menuBar - to be displayed in the frame.public GFrame(String widgetId, String title, GPanel panel)
widgetId - widget identifier.title - to be displayed in the frame.panel - to be displayed in the container area.public final void setGPanel(GPanel panel)
setGPanel in class GComponentpanel - to be displayed in the container area.public final void setGMenuBar(GMenuBar menuBar)
menuBar - to be displayed in the frame.public final void setDefaultCloseOperation(GFrame.CloseAction action)
action - the default action for the close operation.public void dispose()
public void display()
public void setMinimumSize(Dimension d)
d - minimum size dimension.public void setPreferredSize(Dimension d)
d - preferred size dimension.public void setMaximumSize(Dimension d)
d - maximum size dimension.public JFrame getJFrame()
public Component getComponent()
getComponent in class GComponentpublic void windowOpened(WindowEvent e)
windowOpened in interface WindowListenerpublic void windowClosing(WindowEvent e)
windowClosing in interface WindowListenerpublic void windowClosed(WindowEvent e)
windowClosed in interface WindowListenerpublic void windowIconified(WindowEvent e)
windowIconified in interface WindowListenerpublic void windowDeiconified(WindowEvent e)
windowDeiconified in interface WindowListenerpublic void windowActivated(WindowEvent e)
windowActivated in interface WindowListenerpublic void windowDeactivated(WindowEvent e)
windowDeactivated in interface WindowListenerCopyright © 2024. All rights reserved.