public class IlvMDIMainFrame extends JFrame implements IlvMainWindow
JFrame.AccessibleJFrame
Frame.AccessibleAWTFrame
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DEFAULT_CONTAINER_TEMPLATE_NAME
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvMDIMainFrame()
Creates a new
IlvMDIMainFrame . |
IlvMDIMainFrame(boolean dockingBars,
boolean dockingPanes)
Creates a new
IlvMDIMainFrame . |
IlvMDIMainFrame(Container contentPane)
Creates a new
IlvMDIMainFrame with the specified container
as the content pane. |
Modifier and Type | Method and Description |
---|---|
void |
addContainerTemplate(String name,
IlvContainerTemplate containerTemplate)
Adds the specified container template to the list of container templates
managed by the main window.
|
void |
close()
Closes the application associated with this window.
|
void |
containerActivated(IlvViewContainer viewContainer)
Invoked when a view container owned by this main window has been
activated.
|
IlvViewContainer |
getActiveViewContainer()
Returns the active view container.
|
IlvApplication |
getApplication()
Returns the application of the main frame.
|
IlvContainerTemplate |
getContainerTemplate(String name)
Returns the container template stored by the main window with the specified
name.
|
IlvContainerTemplate[] |
getContainerTemplates()
Returns the container templates managed by this main window.
|
IlvDockingArea |
getDockingArea()
Returns the docking area associated with this main window.
|
IlvDockingBarArea |
getDockingBarArea()
Returns the docking bar area associated with this main window.
|
Object[] |
getMainBars()
Gets the menu and toolbars of the main window that do not depend on a
specific document type.
|
IlvMDIClient |
getMDIClient()
Gets the MDI client of the frame.
|
IlvSettings |
getSettings()
Returns the settings that initialize the main frame.
|
IlvSettingsElement |
getSettingsElement()
Returns the settings element that provides the settings for this
MDI main frame.
|
String |
getSettingsName()
Returns the name that identifies the main window within the settings.
|
IlvSettingsQuery |
getSettingsQuery()
Returns the query that selects the settings element that provides
the settings of this main frame.
|
String |
getSettingsType()
Returns the type of the settings element that provides the settings for
this MDI main frame.
|
protected void |
readSettings(IlvSettingsElement settingsElement)
Reads the settings of the main frame.
|
void |
registerActionMethod(String command,
String methodName)
Registers a method to be called when performing the specified action.
|
void |
registerActionStateMethod(String command,
String methodName)
Registers a method to be called when updating the specified action.
|
void |
registerStaticContainer(String name,
IlvViewContainer container)
Registers the specified view container as a static container within the
main window.
|
void |
registerStaticView(String name,
IlvDocumentView view)
Registers the specified document view as a static view within the
main window.
|
void |
setApplication(IlvApplication application)
Sets the application of the main frame.
|
void |
setMDIClient(IlvMDIClient mdiClient)
Sets the MDI client of the frame.
|
void |
setSettings(IlvSettings settings)
Sets the settings that initialize the main frame.
|
void |
setSettingsElement(IlvSettingsElement element)
Forces the settings of the MDI main frame to be read and written from the
specified settings element.
|
void |
setSettingsName(String settingsName)
Sets the name that identifies the main frame within the settings.
|
void |
setSettingsQuery(IlvSettingsQuery query)
Sets the query that selects the settings element that provides the settings
for this main frame.
|
void |
setSettingsType(String settingsType)
Sets the type of the settings elements that provides the settings for
this MDI main frame.
|
boolean |
unregisterStaticContainer(IlvViewContainer container)
Unregisters the specified view container from the
main window.
|
void |
unregisterStaticView(IlvDocumentView view)
Unregisters the specified document view from the main window.
|
protected void |
writeSettings(IlvSettingsElement settingsElement)
Writes the settings of the main frame.
|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFont, postEvent
public IlvMDIMainFrame()
IlvMDIMainFrame
. It is equivalent to the
IlvMDIMainFrame(boolean, boolean)
constructor method with false
given as the parameters.IlvMDIMainFrame(boolean, boolean)
public IlvMDIMainFrame(boolean dockingBars, boolean dockingPanes)
IlvMDIMainFrame
.dockingBars
- If true
, a bar docking area is created and
added to the frame so that it fits all the area of the content pane of
the frame. If false
, no docking bar area is created.dockingPanes
- If true
, a docking panes area is created
and added to the frame so that it fits: dockingBars
is true
.dockingBars
is
false
.false
, no docking pane area is created.IlvMDIMainFrame()
public IlvMDIMainFrame(Container contentPane)
IlvMDIMainFrame
with the specified container
as the content pane.contentPane
- The container in which the main frame will create
components, such as the MDI container pane.public void setMDIClient(IlvMDIClient mdiClient)
public IlvMDIClient getMDIClient()
public IlvContainerTemplate getContainerTemplate(String name)
getContainerTemplate
in interface IlvMainWindow
name
- The name of the container template to retrieve.IlvAbstractMainWindow.addContainerTemplate(java.lang.String, ilog.views.appframe.docview.IlvContainerTemplate)
public IlvContainerTemplate[] getContainerTemplates()
public void addContainerTemplate(String name, IlvContainerTemplate containerTemplate)
name
- The name to associate with the container template. This name
can be used to retrieve the container template with the method
getContainerTemplate(java.lang.String)
.containerTemplate
- The new container template.public IlvViewContainer getActiveViewContainer()
getActiveViewContainer
in interface IlvMainWindow
public Object[] getMainBars()
getJMenuBar
and
SetJMenuBar
methods) if exists, plus all the toolbars that
are docked or floating on this frame.getMainBars
in interface IlvMainWindow
JToolBar
instance or a JMenuBar
instance.public IlvApplication getApplication()
getApplication
in interface IlvMainWindow
IlvMainWindow.setApplication(ilog.views.appframe.IlvApplication)
public void setApplication(IlvApplication application)
setApplication
in interface IlvMainWindow
application
- The application of the main frame.IlvMainWindow.getApplication()
public void containerActivated(IlvViewContainer viewContainer)
containerActivated
in interface IlvMainWindow
viewContainer
- The view container that has been activated.public IlvSettings getSettings()
setSettings(ilog.views.appframe.settings.IlvSettings)
public void setSettings(IlvSettings settings)
settings
- The new settings of the main frame.getSettings()
public String getSettingsType()
IlvSwingMainWindow.SWING_MAIN_WINDOW_SETTINGS_TYPE
string if no settings type has been specified with the method
setSettingsType(java.lang.String)
.readSettings(ilog.views.appframe.settings.IlvSettingsElement)
,
setSettingsType(java.lang.String)
public void setSettingsType(String settingsType)
settingsType
- The new settings type.readSettings(ilog.views.appframe.settings.IlvSettingsElement)
,
getSettingsType()
,
getSettingsQuery()
public String getSettingsName()
name
attribute of the
settings element that provides the settings for the associated object.
If no name has been specified using the method setSettingsName(java.lang.String)
,
null
is returned.setSettingsName(java.lang.String)
,
getSettingsElement()
,
getSettingsQuery()
public void setSettingsName(String settingsName)
settingsName
- The new settings name.getSettingsName()
public void setSettingsQuery(IlvSettingsQuery query)
query
- The new settings query.getSettingsQuery()
public IlvSettingsQuery getSettingsQuery()
If a query has been specified with the method setSettingsQuery(ilog.views.appframe.settings.IlvSettingsQuery)
,
it is returned. Otherwise, a query is built for selecting a settings
root element with the type returned by getSettingsType()
and the
value of the name
attribute equal to the name returned
by getSettingsName()
. If getSettingsName()
returns
null
, the query selects the first encountered root element
with the settings type given by the method getSettingsType()
.
setSettingsQuery(ilog.views.appframe.settings.IlvSettingsQuery)
,
getSettingsName()
,
getSettingsType()
public void setSettingsElement(IlvSettingsElement element)
getSettings()
with the query getSettingsQuery()
.element
- The settings element that provides the settings for the
main frame.getSettingsElement()
public IlvSettingsElement getSettingsElement()
setSettingsElement(ilog.views.appframe.settings.IlvSettingsElement)
method, it is returned. Otherwise,
the settings element is selected from the settings given by the
getSettings()
method, with the query returned by
getSettingsQuery()
.null
if no settings
element could be found.setSettingsElement(ilog.views.appframe.settings.IlvSettingsElement)
,
getSettingsQuery()
protected void readSettings(IlvSettingsElement settingsElement)
settingsElement
- The root settings element that contain the
settings for this main frame.protected void writeSettings(IlvSettingsElement settingsElement)
settingsElement
- The root settings element to write the settings to.public void close()
public void registerStaticView(String name, IlvDocumentView view)
IlvPanelView
within the main frame.The view does not depend on a specific document but is associated with the active document of the application, if the document template of this document has been declared to use this view (one of the container templates of the document templates has the same name as the name used to register this view).
When a document becomes active, for example if a container containing
one of its views becomes active, the
ilog.views.appframe.docview.IlvDocumentView#DOCUMENT_PROPERTY}
of the view is set to this document, and its method
IlvDocumentView.initializeView(ilog.views.appframe.docview.IlvDocument)
is
called with the new active document as the parameter.
registerStaticView
in interface IlvMainWindow
name
- The name that identifies this view and that must be used if
calling the method unregisterStaticView(ilog.views.appframe.docview.IlvDocumentView)
. This name also
identifies a single container template created for this view and must
then be unique among all the container template added to this main window.view
- The static view to register.unregisterStaticView(ilog.views.appframe.docview.IlvDocumentView)
public void unregisterStaticView(IlvDocumentView view)
unregisterStaticView
in interface IlvMainWindow
view
- The static view to unregister.registerStaticView(java.lang.String, ilog.views.appframe.docview.IlvDocumentView)
public void registerStaticContainer(String name, IlvViewContainer container)
This view container is not created when a document is created but rather with the main window itself. Typically, it can be defined at design time in an IDE when designing the main frame by inserting an instance of a view container within the main frame.
When a document becomes active, for example if a container containing
one of its view(s) becomes active, the views
of the specified container are set to the new active document by setting
the
ilog.views.appframe.docview.IlvDocumentView#DOCUMENT_PROPERTY}
of the view to this document, and its method
IlvDocumentView.initializeView(ilog.views.appframe.docview.IlvDocument)
is
called with the new active document as the parameter.
registerStaticContainer
in interface IlvMainWindow
name
- The name that identifies this view and that must be used if
calling the method unregisterStaticView(ilog.views.appframe.docview.IlvDocumentView)
. This name also
identifies a single container template created for this view and must
then be unique among all the container template added to this main window.container
- The static container to register.unregisterStaticContainer(ilog.views.appframe.docview.IlvViewContainer)
public boolean unregisterStaticContainer(IlvViewContainer container)
unregisterStaticContainer
in interface IlvMainWindow
container
- The static container to unregister.true
if the specified container was previously
registered to this main window; false
otherwise.registerStaticContainer(java.lang.String, ilog.views.appframe.docview.IlvViewContainer)
public void registerActionMethod(String command, String methodName)
The specified method must have been defined with the following signature:
public void methodName(ActionEvent e) { ... }
command
- The command key of the action to associated with the
the specified method.methodName
- The name of the method to associate with the action.public void registerActionStateMethod(String command, String methodName)
The specified method must have been defined with the following signature:
public boolean methodName(Action action) { ... }
command
- The command key of the action to be updated.methodName
- The name of the method to associate with the action with
the specified command key.public IlvDockingArea getDockingArea()
null
if the docking
capabilities were disabled when creating the frame.IlvMDIMainFrame(boolean, boolean)
public IlvDockingBarArea getDockingBarArea()
null
if the docking
capabilities were disabled when creating the frame.IlvMDIMainFrame(boolean, boolean)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.