public class IlvMDIApplet extends JApplet implements IlvMainWindow
JApplet.AccessibleJApplet
Applet.AccessibleApplet
Panel.AccessibleAWTPanel
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
HTML_CHOICES_TABLE_NAME
Name of the HTML table whose content is replaced by the HTML code
generated for the specified URL choices.
|
static String |
MDI_APPLET_SETTINGS_TYPE
Type of the settings elements that provide settings for MDI applets
|
accessibleContext, rootPane, rootPaneCheckingEnabled
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DEFAULT_CONTAINER_TEMPLATE_NAME
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvMDIApplet()
Creates a new
IlvMDIApplet . |
IlvMDIApplet(boolean dockingBars,
boolean dockingPanes)
Creates a new
IlvMDIApplet . |
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 applet.
|
void |
containerActivated(IlvViewContainer viewContainer)
Invoked when a view container owned by this main window has been
activated.
|
IlvViewContainer |
getActiveViewContainer()
Returns the active document view container.
|
IlvApplication |
getApplication()
Returns the application of the applet.
|
IlvContainerTemplate |
getContainerTemplate(String name)
Returns the container template of the applet with the specified
name.
|
IlvContainerTemplate[] |
getContainerTemplates()
Returns the container templates managed by this applet.
|
IlvDockingArea |
getDockingArea()
Returns the docking area associated with this applet.
|
IlvDockingBarArea |
getDockingBarArea()
Returns the docking bar area associated with this applet.
|
URL[] |
getFileChooserChoices()
Returns the array of URLs that can be selectable from the applet file
chooser.
|
URL |
getFileChooserHTMLPage()
Returns the URL to the HTML page that is displayed by the main file
chooser of the application.
|
Object[] |
getMainBars()
Gets the menu and toolbars of the main window that do not depend on a
specific document type.
|
IlvMDIClient |
getMDIClient()
Returns the MDI client of the applet.
|
IlvSettings |
getSettings()
Returns the settings that initialize the applet.
|
IlvSettingsElement |
getSettingsElement()
Returns the settings element that provides the settings for this
MDI applet.
|
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.
|
void |
init()
Called by the browser or applet viewer to inform
this applet that it has been loaded into the system.
|
protected void |
readSettings(IlvSettingsElement settingsElement)
Reads the settings of the main frame.
|
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
applet.
|
void |
setApplication(IlvApplication application)
Sets the application of this applet.
|
void |
setFileChooserChoices(URL[] urls)
Specifies an array of URLs that can be selected from the applet file chooser.
|
void |
setFileChooserHTMLPage(URL url)
Specifies a URL to an HTML page that is displayed by the main file chooser
of the application for selecting a document file.
|
void |
setMDIClient(IlvMDIClient mdiClient)
Sets the MDI client of the applet.
|
void |
setSettings(IlvSettings settings)
Sets the settings that initialize the applet.
|
void |
setSettingsElement(IlvSettingsElement element)
Forces the settings of the MDI applet 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.
|
void |
start()
Called by the browser or applet viewer to inform
this applet that it should start its execution.
|
void |
stop()
Called by the browser or applet viewer to inform this applet that it should stop its execution.
|
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, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
destroy, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, isValidateRoot, newAudioClip, play, play, resize, resize, setStub, showStatus
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, 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, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, revalidate, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final String MDI_APPLET_SETTINGS_TYPE
public static final String HTML_CHOICES_TABLE_NAME
"ChoiceTable"
.public IlvMDIApplet()
IlvMDIApplet
. It is equivalent to the
IlvMDIApplet(boolean, boolean)
constructor method with
false
given as the parameter.IlvMDIApplet(boolean, boolean)
public IlvMDIApplet(boolean dockingBars, boolean dockingPanes)
IlvMDIApplet
.dockingBars
- If true
, a bar docking area is created and
added to the applet so that it fits all the area of the content pane of
the applet. If false
, no docking bar area is created.dockingPanes
- If true
, a docking panes area is created
and added to the applet so that it fits: dockingBars
is true
.dockingBars
is
false
.dockingPanes
is false
, no docking pane
area is created.IlvMDIApplet()
public void init()
start
method is
called.
A subclass of Applet
should override this method if
it has an initialization to perform. For example, an applet with
threads would use the init
method to create the
threads and the destroy
method to kill them.
init
in class Applet
Applet.destroy()
,
Applet.start()
,
Applet.stop()
public void start()
init
method and each time the applet is revisited
in a Web page.
A subclass of Applet
should override this method if
it has any operation that it wants to perform each time the Web
page containing it is visited. For example, an applet with
animation might want to use the start
method to
resume animation and the stop
method to suspend the
animation.
start
in class Applet
Applet.destroy()
,
Applet.init()
,
Applet.stop()
public void stop()
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 it 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 applet.IlvMainWindow.getApplication()
public void containerActivated(IlvViewContainer viewContainer)
containerActivated
in interface IlvMainWindow
viewContainer
- The view container that has been activated.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 template 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 templates 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 views 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 templates 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 IlvSettings getSettings()
setSettings(ilog.views.appframe.settings.IlvSettings)
public void setSettings(IlvSettings settings)
settings
- The new settings of the applet.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.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)
,
#see #getSettingsType
public void setSettingsElement(IlvSettingsElement element)
getSettings()
with the query getSettingsQuery()
.element
- The settings element that provides the settings for the
MDI applet.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 contains the
settings for this main frame.protected void writeSettings(IlvSettingsElement settingsElement)
settingsElement
- The root settings element to write the settings to.public IlvDockingArea getDockingArea()
null
if the docking
capabilities were disabled when creating the applet.IlvMDIApplet(boolean, boolean)
public IlvDockingBarArea getDockingBarArea()
null
if the docking
capabilities were been disabled when creating the applet.IlvMDIApplet(boolean, boolean)
public void setFileChooserHTMLPage(URL url)
setFileChooserChoices(java.net.URL[])
method. Before the HTML page is displayed, the content of an HTML table
element it contains is replaced by a list of HTML table rows, each
row allowing you to select one of the specified document files.The rule for retrieving the HTML table for replacing its content is:
"name"
attribute equal to HTML_CHOICES_TABLE_NAME
,
it is selected.url
- The URL to the HTML page.getFileChooserHTMLPage()
public URL getFileChooserHTMLPage()
setFileChooserHTMLPage(java.net.URL)
public void setFileChooserChoices(URL[] urls)
tr
tags encountered in
the file chooser HTML page template (see setFileChooserHTMLPage(java.net.URL)
).urls
- The array of document file URLs that are selectable from the
applet file chooser.getFileChooserChoices()
,
setFileChooserHTMLPage(java.net.URL)
public URL[] getFileChooserChoices()
setFileChooserChoices(java.net.URL[])
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.