public class IlvDashboardEditor extends IlvDashboardContext
IlvDashboardEditor
is the core class for a Dashboard Editor
application, it provides access to the common Dashboard Editor components
and manages global properties. Subclassing IlvDashboardEditor
lets you override some of the Dashboard Editor default behavior.
See the DashboardEditor demo application to see how
IlvDashboardEditor
is used as the central class for a
Dashboard Editor application.
Note: IlvDashboardEditor
is not
a graphical component.
IlvDashboardDiagram
,
IlvDashboardPropertyPanel
,
IlvDashboardSymbolPalette
,
IlvDashboardEditorFrame
,
IlvDashboardPanelManager
,
Serialized FormVERSION
Constructor and Description |
---|
IlvDashboardEditor()
Constructs a Dashboard Editor with the default resource bundle.
|
IlvDashboardEditor(ResourceBundle bundle,
String[] args)
Constructs an
IlvDashboardEditor instance using the resource
bundle bundle and command line arguments args . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canExit()
Tests if the Dashboard Editor application can exit.
|
protected IlvDashboardDiagram |
createDashboardDiagram()
Creates an instance of
IlvDashboardDiagram |
protected IlvDashboardEditorFrame |
createFrame()
Invoked by the
init(String[]) method to create the main
frame window for a Dashboard Editor application. |
protected JMenuItem |
createMenuItem(Action action)
Creates and returns a Swing menu item for the given
action . |
protected void |
dashboardAdded(IlvDashboardDiagram diagram)
Invoked when a new dashboard diagram has been added to the
Dashboard Editor.
|
protected void |
dashboardRead(IlvDashboardDiagram diagram)
Invoked when a dashboard has read its contents.
|
protected void |
dashboardRemoved(IlvDashboardDiagram diagram)
Invoked when a dashboard diagram is removed from the
Dashboard Editor.
|
protected void |
dashboardWritten(IlvDashboardDiagram diagram)
Invoked when a dashboard has saved its contents.
|
void |
exit()
Exits the Dashboard Editor application if
canExit()
returns true . |
IlvDashboardDiagram |
getCurrentDashboardDiagram()
Returns the currently selected dashboard diagram in its dashboard container.
|
IlvDashboardContainer |
getDashboardContainer()
Returns the dashboard container for this Dashboard Editor instance.
|
int |
getDiagramCount()
Returns the number of the dashboard diagrams created with
this
IlvDashboardEditor instance. |
protected JPopupMenu |
getDiagramPopupMenu()
Returns the dashboard diagram pop-up menu used when a dashboard
implementation returns a pop-up menu providing access to a set of
predefined JViews Diagrammer Swing actions.
|
IlvDashboardDiagramIterator |
getDiagrams()
Returns an iterator for the collection of all
IlvDashboardDiagram objects in this Dashboard Editor application. |
Component |
getDialogParent()
Returns the frame window for this
IlvDashboardEditor
instance. |
IlvDashboardEditManager |
getEditManager()
Returns the edit manager of the Dashboard Editor.
|
IlvDashboardEditorFrame |
getFrame()
Returns the frame window for this Dashboard Editor application.
|
IlvDashboardLinkManager |
getLinkManager()
Returns the dashboard link manager.
|
IlvDashboardPanel |
getPanel(String id)
Returns the last dashboard panel created with the given
id . |
IlvDashboardPreferences |
getPreferences()
Gets an
IlvDashboardPreferences object from the editor. |
IlvDashboardStatusViewer |
getStatusViewer()
Returns the status viewer used by the graphical components in this Dashboard
Editor application.
|
void |
init(String[] args)
Initializes the internal properties of the Dashboard Editor application.
|
boolean |
isGeneralPathEnabled()
Tests if the background graphic objects are created using general path
objects instead of predefined
IlvGraphic objects. |
protected Iterator<IlvPalette> |
loadInitialPalettes()
Returns the URLs of the symbol palettes to load when the
Dashboard Editor starts.
|
void |
run()
Starts the Dashboard Editor application by creating a new
IlvDashboardDiagram instance. |
protected void |
savePreferences()
Saves the preferences before terminating the session.
|
void |
setCurrentDashboardDiagram(IlvDashboardDiagram diagram)
Sets
diagram as the currently active dashboard diagram in the
dashboard container. |
void |
setDashboardContainer(IlvDashboardContainer container)
Sets the dashboard container of this Dashboard Editor application.
|
void |
setEditManager(IlvDashboardEditManager editManager)
Sets the dashboard edit manager.
|
void |
setGeneralPathEnabled(boolean enabled)
Enables or disables the use of general path objects.
|
void |
setLinkManager(IlvDashboardLinkManager linkManager)
Sets the link manager.
|
void |
setPaletteViewer(IlvPaletteManagerViewer viewer)
Sets the palette manager viewer of the dashboard editor.
|
void |
setPreferences(IlvDashboardPreferences prefs)
Sets an
IlvDashboardPreferences object to the
editor. |
void |
setStatusViewer(IlvDashboardStatusViewer statusViewer)
Sets a status viewer used by the graphical components in this Dashboard
Editor application.
|
void |
showStatus(String message)
Shows a status message in this Dashboard Editor application.
|
getLogger, getPaletteManager, getResourceBundle, getStyleSheetURL, isDefaultMappingEnabled, loadPalette, loadPalettes, logMessage, setDefaultMappingEnabled, setDialogParent, setStyleSheetURL
public IlvDashboardEditor()
public IlvDashboardEditor(ResourceBundle bundle, String[] args)
IlvDashboardEditor
instance using the resource
bundle bundle
and command line arguments args
.bundle
- Specific resources for this Dashboard Editor application.args
- Command line arguments.protected IlvDashboardEditorFrame createFrame()
init(String[])
method to create the main
frame window for a Dashboard Editor application.IlvDashboardEditorFrame
instance.init(String[])
public IlvDashboardEditorFrame getFrame()
public Component getDialogParent()
IlvDashboardEditor
instance.getDialogParent
in class IlvDashboardContext
IlvDashboardEditor
instance.getFrame()
,
IlvDashboardEditorFrame
,
IlvDashboardContext.getDialogParent()
public IlvDashboardLinkManager getLinkManager()
IlvDashboardLinkManager
public void setLinkManager(IlvDashboardLinkManager linkManager)
linkManager
- The link manager.IlvDashboardLinkManager.IlvDashboardLinkManager(IlvDashboardEditor)
public IlvDashboardEditManager getEditManager()
IlvDashboardEditManager
public void setEditManager(IlvDashboardEditManager editManager)
editManager
- The edit manager.IlvDashboardEditManager.IlvDashboardEditManager(IlvDashboardEditor)
public void init(String[] args)
IlvDashboardEditorFrame
instance.args
- Command line arguments.IlvDashboardEditorFrame
public void run()
IlvDashboardDiagram
instance.
Call this method after calling init(String[])
.init(String[])
public void exit()
canExit()
returns true
.canExit()
protected void savePreferences()
protected boolean canExit()
true
if all IlvDashboardDiagram
instances in this object can be closed.true
if this Dashboard Editor application can exit.exit()
public IlvDashboardContainer getDashboardContainer()
public void setDashboardContainer(IlvDashboardContainer container)
container
- The dashboard container.protected IlvDashboardDiagram createDashboardDiagram()
IlvDashboardDiagram
public IlvDashboardDiagram getCurrentDashboardDiagram()
IlvDashboardContainer.getSelectedDashboardDiagram()
public void setCurrentDashboardDiagram(IlvDashboardDiagram diagram)
diagram
as the currently active dashboard diagram in the
dashboard container.diagram
- The dashboard diagram to select.IlvDashboardContainer.setSelectedDashboardDiagram(IlvDashboardDiagram)
,
IlvDashboardContainer
public IlvDashboardDiagramIterator getDiagrams()
IlvDashboardDiagram
objects in this Dashboard Editor application.IlvDashboardDiagram
objects.IlvDashboardDiagram
public int getDiagramCount()
IlvDashboardEditor
instance.public void setPaletteViewer(IlvPaletteManagerViewer viewer)
viewer
- The palette manager viewer.public boolean isGeneralPathEnabled()
IlvGraphic
objects.
A general path object enables you to use enhanced graphic attributes such as gradients.
true
if general path object use is enabled.setGeneralPathEnabled(boolean)
public void setGeneralPathEnabled(boolean enabled)
enabled
- Set to true
to enable the use of general path
objects.isGeneralPathEnabled()
public void setStatusViewer(IlvDashboardStatusViewer statusViewer)
statusViewer
- The status viewer that will display all the status
messages.IlvDashboardDefaultStatusViewer
,
IlvDashboardStatusViewer
,
IlvDashboardEditorFrame
public IlvDashboardStatusViewer getStatusViewer()
IlvDashboardDefaultStatusViewer
,
IlvDashboardEditorFrame
public void showStatus(String message)
If no IlvDashboardDefaultStatusViewer
has been added to
this Dashboard Editor application, message
cannot be
displayed.
message
- The message to be displayed in the status window.setStatusViewer(IlvDashboardStatusViewer)
,
IlvDashboardDefaultStatusViewer
,
IlvDashboardStatusViewer
,
IlvDashboardEditorFrame
protected void dashboardAdded(IlvDashboardDiagram diagram)
diagram
- The added dashboard diagram.protected void dashboardRead(IlvDashboardDiagram diagram)
diagram
- The dashboard diagram.protected void dashboardWritten(IlvDashboardDiagram diagram)
diagram
- The dashboard diagram.protected void dashboardRemoved(IlvDashboardDiagram diagram)
diagram
- The removed dashboard diagram.public IlvDashboardPanel getPanel(String id)
id
.
Note: If this Dashboard Editor contains more than one
panel with id
, this method returns the last panel added
with this id
id
- The ID of the panel.id
or null
if no panel exists with id
.IlvDashboardPropertyPanel
,
IlvDashboardSymbolPalette
,
IlvDashboardEditorFrame
,
IlvDashboardPanelManager
public void setPreferences(IlvDashboardPreferences prefs)
IlvDashboardPreferences
object to the
editor.prefs
- an implementation of the Dashboard Editor preferences.IlvDashboardPreferences
,
getPreferences()
public IlvDashboardPreferences getPreferences()
IlvDashboardPreferences
object from the editor.IlvDashboardPeferences
of the editor.IlvDashboardPreferences
,
setPreferences(IlvDashboardPreferences)
protected JPopupMenu getDiagramPopupMenu()
createMenuItem(Action)
function to create
the menu items.createMenuItem(Action)
protected JMenuItem createMenuItem(Action action)
action
.
Use this method to create a menu item for an
IlvDiagrammerAction
instance.
Predefined listeners are added to the created menu item, and when
applicable, a JCheckBoxMenuItem
instance is created
for selectable actions.action
- The Swing Action
for which the returned menu
item is created.getDiagramPopupMenu()
protected Iterator<IlvPalette> loadInitialPalettes() throws IOException
IOException
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.