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.Operation
NAME_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, writeConfigItem
public 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 GComponent
panel
- 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 GComponent
public void windowOpened(WindowEvent e)
windowOpened
in interface WindowListener
public void windowClosing(WindowEvent e)
windowClosing
in interface WindowListener
public void windowClosed(WindowEvent e)
windowClosed
in interface WindowListener
public void windowIconified(WindowEvent e)
windowIconified
in interface WindowListener
public void windowDeiconified(WindowEvent e)
windowDeiconified
in interface WindowListener
public void windowActivated(WindowEvent e)
windowActivated
in interface WindowListener
public void windowDeactivated(WindowEvent e)
windowDeactivated
in interface WindowListener
Copyright © 2024. All rights reserved.