public class IlvDashboardDiagram extends IlvDiagrammer implements Iterable<IlvDashboardSymbol>
IlvDashboardDiagram
is used to store and manipulate
IlvDashboardSymbol
and IlvGraphic
objects
displayed using an IlvDashboardEditor
instance.
IlvDashboardDiagram
is an extension of
IlvDiagrammer
.
IlvDashboardDiagram
instance is to
organize, edit, and save JViews symbols and graphic objects. Symbols
are represented by one or more IlvDashboardSymbol
instances.
Background images are represented by standard graphic objects. That is,
instances of IlvGraphic
and its subclasses. Symbols and graphic
objects can be added, removed, grouped, distributed and aligned in a
dashboard diagram either programmatically or by using the user interface.
A dashboard diagram is used to display business or system critical information visually.
IlvDashboardDiagram
is a front-end that gives access to
the functionality provided by the underlying JViews packages: the Graphic
Framework, the Stylable Data Mapper (SDM), and the Graph Layout package.
These underlying packages can be accessed directly if you need to use
advanced features contained in the packages or extend the dashboard diagram
component.
IlvDashboardDiagram
.
public class DashEditorExample extends JFrame { private IlvDashboardEditor dashEd; private IlvDashboardEditBar editToolBar; private IlvDashboardSymbolPalette palettePanel; private IlvDashboardDiagram dashDiag; public DashEditorExample(String[] args) { // Set up the application frame. super("Basic Diagrammer Application"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLocation(100, 100); setSize(700, 700); // Create the editor with a single diagram. dashEd = new IlvDashboardEditor(); dashEd.init(args); IlvDashboardTabbedPane tabPane = new IlvDashboardTabbedPane(dashEd); dashEd.setDashboardContainer(tabPane); // Add the Edit toolbar. editToolBar = new IlvDashboardEditBar(); // Add the Symbol palette palettePanel = new IlvDashboardSymbolPalette(dashEd); // Add the Dashboard components into the JFrame getContentPane().setLayout(new BorderLayout()); getContentPane().add(tabPane, BorderLayout.CENTER); getContentPane().add(editToolBar, BorderLayout.NORTH); getContentPane().add(palettePanel, BorderLayout.LINE_END); dashEd.loadPalette("ilog/views/palettes/controls/"); dashEd.loadPalette("ilog/views/palettes/shared/"); dashEd.run(); } public static void main(String[] args) { DashEditorExample basicEditor = new DashEditorExample(args); basicEditor.setVisible(true); } }
IlvDashboardDiagram
is a JavaBean. That is, all communication
in this class is achieved by firing events using the
IlvDashboardAction
class.
IlvDashboardAction
is a base class for Swing Actions
that act on an IlvDashboardDiagram
object. It contains a set
of predefined actions that call the main IlvDashboardDiagram
methods. For example, a save action in IlvDashboardEditBar
fires an IlvDashboardAction.save
event, which in turn calls
IlvDashboardDiagram.writeDashboard(URL)
.
writeDashboard(URL)
and opened by calling
readDashboard(URL url)
.
Note: Before opening a dashboard file, the palette
containing the symbols contained in the dashboard must be loaded. This is
done by calling IlvDashboardEditor.loadPalette
from the
IlvDashboardEditor
instance stored inside your
IlvDashboardDiagram
instance.
IlvDashboardDiagram
instance.
To extend IlvDashboardDiagram
functionality you may need to use
these classes directly. The main entry point to the package is the
ilog.views.sdm.IlvSDMEngine
class.IlvDashboardSymbol
,
IlvDashboardEditorFrame
,
IlvDashboardAction
,
IlvDashboardEditBar
,
IlvDashboardAction
,
IlvSDMEngine
,
Serialized FormIlvDiagrammer.PrinterExceptionHandler
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvDashboardDiagram(IlvDashboardContext context)
Constructs an
IlvDashboardDiagram instance using an
IlvDashboardContext instance. |
IlvDashboardDiagram(IlvDashboardContext context,
IlvSDMView view)
Constructs an
IlvDashboardDiagram instance using a specific
IlvDashboardContext and an
IlvSDMView . |
Modifier and Type | Method and Description |
---|---|
void |
addStyleSheet(URL url)
This method is not supported by
IlvDashboardDiagram . |
void |
addSymbol(IlvDashboardSymbol symbol)
Adds a new
IlvDashboardSymbol instance to this
dashboard diagram. |
void |
addSymbolParameterListener(IlvDashboardSymbolParameterListener listener)
Adds a symbol parameter listener that will be notified when
the value or the mapping of a symbol parameter is changed.
|
void |
addUndoableEdit(UndoableEdit edit)
Add the last user action to the list of edits that can be undone and
redone for this dashboard diagram.
|
void |
alignBottom()
Aligns the currently selected objects along the bottom axis of their
bounding boxes.
|
void |
alignHorizontalCenter()
Aligns the currently selected objects along the horizontal center of their
bounding boxes.
|
void |
alignLeft()
Aligns the currently selected objects along the left side of their
bounding boxes.
|
void |
alignRight()
Aligns the currently selected objects along the right side of their
bounding boxes.
|
void |
alignTop()
Aligns the currently selected objects along the top of their
bounding boxes.
|
void |
alignVerticalCenter()
Aligns the currently selected objects along the vertical center of their
bounding boxes.
|
boolean |
canAlign()
Tests if the symbols and background objects currently selected by the user
can be aligned.
|
boolean |
canDistribute()
Tests if a geometric space distribution can be applied to
symbols and background object currently selected by the user.
|
boolean |
canEdit()
Tests if at the dashboard diagram is editable.
|
boolean |
canGroup()
Tests if the objects currently selected can be grouped.
|
boolean |
canPaste()
Tests if dashboard diagram data is present on the clipboard.
|
boolean |
canRedo()
Tests if their are significant changes to the dashboard diagram that have
been undone.
|
boolean |
canSelect()
Tests if this dashboard diagram is empty.
|
boolean |
canUndo()
Tests the dashboard diagram to see if significant edits have been done
by the user.
|
boolean |
canUngroup()
Tests to see if the currently selected objects contain a grouped
background object.
|
void |
clear()
Deletes all symbols and background objects contained in this dashboard
diagram.
|
void |
copy()
Copies the symbols and background objects currently selected by the user to
the clipboard.
|
void |
cut()
Cuts the symbols and background objects currently selected by the user and
saves them to the clipboard.
|
void |
delete()
Deletes the symbols and/or background object currently selected by the user
in the dashboard diagram.
|
void |
distributeHorizontally()
Distributes the currently selected objects horizontally.
|
void |
distributeVertically()
Distributes the currently selected objects vertically.
|
void |
duplicate()
Duplicates the symbols and background objects currently selected by the user.
|
void |
fireSymbolParameterChanged(IlvDashboardSymbol symbol,
IlvDashboardSymbol.Parameter parameter,
Object oldValue,
Object newValue,
String oldMapping,
String newMapping)
This method calls the
parameterChanged method
of all symbol parameter listeners of this dashboard diagram. |
IlvDashboardGraphicIterator |
getBackgroundGraphics()
Returns all background graphic objects contained in this
dashboard diagram.
|
int |
getBaseTextDirection()
Returns the global base direction of text in the diagram.
|
IlvDashboardContext |
getContext()
Returns the
IlvDashboardContext instance used by the
dashboard diagram instance. |
IlvDashboardSymbol |
getGraphicSymbol(IlvGraphic graphic)
Returns the symbol corresponding to
graphic . |
IlvDashboardSymbol |
getObjectSymbol(Object modelObject)
Returns the symbol corresponding to
modelObject . |
IlvManagerPrintingController |
getPrintingController()
Returns the printing controller that handles all the printing-related
tasks for this diagram component.
|
IlvDashboardSymbolIterator |
getSelectedSymbols()
Returns an iterator to run over the collection of symbols currently
selected in this dashboard diagram.
|
IlvDashboardKeySelectManager |
getSelectManager()
Returns the selection manager used by this dashboard diagram.
|
ArrayList<Object> |
getSerializableProperties() |
IlvDashboardSymbol |
getSymbol(String id)
Returns the symbol whose ID corresponds to
id . |
int |
getSymbolIndex(IlvDashboardSymbol symbol)
Returns the index of the symbol in the dashboard diagram list.
|
IlvDashboardSymbolIterator |
getSymbols()
Deprecated.
You should use
iterator() instead. |
URL |
getURL()
Returns the URL of this dashboard diagram.
|
void |
group()
Groups the background graphic objects currently selected by the user.
|
boolean |
hasSelectedSymbols()
Tests if at least a symbol in this dashboard diagram is selected.
|
boolean |
isBackgroundObject(IlvGraphic graphic)
Tests if
graphic is a background object. |
boolean |
isContained(IlvDashboardSymbol symbol)
Tests if the given symbol is contained in this
dashboard diagram.
|
boolean |
isEmpty()
Tests if the dashboard diagram is empty.
|
boolean |
isLinkLayoutEnabled()
Tests if link layout is enabled.
|
boolean |
isModified()
Tests if this dashboard diagram is modified.
|
boolean |
isUndoingEnabled()
Tests if the undo mechanism of this dashboard diagram is enabled.
|
protected boolean |
isValidDocument(Document document)
Tests if
document is a valid dashboard diagram document. |
Iterator<IlvDashboardSymbol> |
iterator()
This method implements the
Iterable interface. |
void |
paste()
Pastes symbols and background object from the clipboard to the
dashboard diagram.
|
void |
prepareForEditing() |
void |
readBackground(InputStream inputStream)
Imports background objects into the dashboard diagram from
inputStream . |
void |
readBinary(InputStream in)
Reads the dashboard binary format contents from an input stream.
|
void |
readBinary(URL url)
Reads a dashboard from a binary file.
|
void |
readDashboard(Document document,
boolean selection,
double dx,
double dy)
Reads the dashboard diagram contents from
document . |
void |
readDashboard(URL url)
Read the dashboard diagram XML format file from
url . |
void |
redo()
Redoes the the last significant change previously undone by the user.
|
void |
removeSymbol(IlvDashboardSymbol symbol)
Removes
symbol from this dashboard diagram. |
void |
removeSymbolParameterListener(IlvDashboardSymbolParameterListener listener)
Removes a symbol parameter listener previously added.
|
void |
selectAll()
Selects all the symbols and background object in the diagram.
|
void |
setBaseTextDirection(int btd)
Changes the global base direction of text in the diagram.
|
void |
setCompoundEditMode(boolean flag) |
void |
setEditingAllowed(boolean editingAllowed)
Sets whether symbols and background images contained in this
dashboard diagram may be modified.
|
void |
setLinkLayoutEnabled(boolean enabled)
Enables or disables the Link Layout.
|
void |
setModified(boolean modified)
Sets the modified flag of the dashboard diagram.
|
void |
setProject(IlvDiagrammerProject project)
Loads a JViews Diagrammer project into this dashboard diagram.
|
void |
setQuadtreeEnabled(boolean enabled)
Enables or disables the use of quadtree in the layers.
|
void |
setSelectManager(IlvDashboardKeySelectManager focusManager)
Sets the selection manager to be used for this dashboard diagram.
|
void |
setSerializableProperties(ArrayList<Object> properties) |
void |
setSymbolIndex(IlvDashboardSymbol symbol,
int index)
Sets a new index of the given symbol in the dashboard diagram list.
|
void |
setUndoingEnabled(boolean enabled)
Enables or disables the undo mechanism of this dashboard diagram.
|
void |
setURL(URL url) |
void |
undo()
Undoes the last significant change to the Dashboard Document.
|
void |
ungroup()
Ungroups the background objects currently selected by the user.
|
void |
writeBackground(OutputStream outputStream)
Writes all background graphic objects in the dashboard diagram to the
given
outputStream in Perforce JViews (.IVL) format. |
void |
writeBackgroundFile(String file)
Writes all background graphic objects in the dashboard diagram to
file in Perforce JViews (.IVL) format. |
void |
writeBinary(OutputStream out)
Writes the contents of the dashboard in binary format to
an output stream.
|
void |
writeBinary(URL url)
Writes the contents of the dashboard in binary format to
a URL.
|
void |
writeDashboard(URL url)
Writes the dashboard diagram contents in XML format to
url . |
void |
writeDashboardFiles() |
void |
writeData()
Writes the diagram to the current data source.
|
void |
writeDataFile(URL url)
Writes the current diagram to the specified data URL.
|
void |
writeProjectFile(URL projectURL)
Writes the diagrammer project file to the specified URL.
|
addObject, assignProject, canPrint, canResetZoom, canZoomIn, canZoomOut, clearAdjusting, clearPrintArea, createGroupParent, createLink, createNode, createScrollComponent, createXMLDataSource, deselectAll, fitToContents, fitToContents, getAllObjects, getChildren, getCurrentDiagrammer, getDataFile, getDataSource, getDefaultStyleSheet, getEditLabelInteractor, getEngine, getGrid, getID, getMaximumZoom, getMinimumZoom, getObject, getObjectProperty, getObjects, getPalette, getPanInteractor, getParent, getProject, getScrollComponent, getSelectedObjects, getSelectInteractor, getSourceNode, getStyleSheet, getStyleSheets, getTag, getTargetNode, getUndoManager, getView, getZoomFactor, getZoomInteractor, hasFrameOrDialogAncestor, isAdjusting, isAutoEditLabel, isAutomaticCurrentDiagrammer, isAutomaticLabelLayout, isAutomaticLinkLayout, isAutomaticNodeLayout, isEditable, isEditingAllowed, isEditLabelMode, isGridVisible, isLabelLayoutAvailable, isLink, isLinkLayoutAvailable, isNodeLayoutAvailable, isPanMode, isResizingAllowed, isScrollable, isSelected, isSelectMode, isStickyModes, isStyleApplicationComponents, isZoomMode, layoutAllNodes, layoutLabels, layoutLinks, layoutSelectedNodes, pageSetup, print, printPreview, printToBitmap, processServerAction, refresh, removeObject, removeStyleSheet, resetZoom, scrollToObject, setAdjusting, setAllSelectedObjects, setAsRoot, setAutoEditLabel, setAutomaticCurrentDiagrammer, setAutomaticLabelLayout, setAutomaticLinkLayout, setAutomaticNodeLayout, setBaseTextDirection, setCurrentDiagrammer, setCurrentDiagrammer, setDataFile, setDataSource, setEditLabelInteractor, setEditLabelMode, setGrid, setGridVisible, setGroupParent, setID, setMaximumZoom, setMinimumZoom, setObjectProperty, setPalette, setPanInteractor, setPanMode, setPrintArea, setPrintingController, setProject, setResizingAllowed, setScrollable, setSelected, setSelectInteractor, setSelectMode, setSourceNode, setStickyModes, setStyleApplicationComponents, setStyleSheet, setTargetNode, setZoomFactor, setZoomInteractor, setZoomMode, writeDataFile, zoomIn, zoomOut
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public IlvDashboardDiagram(IlvDashboardContext context)
IlvDashboardDiagram
instance using an
IlvDashboardContext
instance.
IlvDashboardContext
contains the information necessary for an
IlvDashboardDiagram
instance to function correctly. It
includes the following data:
For this class to function properly it needs to be placed in a containment hierarchy whose root is a top-level Swing container.
context
- The dashboard context used to created this dashboard diagram.IlvDashboardDiagram
instance.public IlvDashboardDiagram(IlvDashboardContext context, IlvSDMView view)
IlvDashboardDiagram
instance using a specific
IlvDashboardContext
and an
IlvSDMView
.
An IlvSDMView
instance connects to and controls the
IlvSDMEngine
used to render the dashboard diagram.
context
- The specific context used to create this dashboard diagram.view
- The SDM viewIlvDashboardDiagram(IlvDashboardContext)
public IlvDashboardContext getContext()
IlvDashboardContext
instance used by the
dashboard diagram instance.IlvDashboardContext
instance used bye the
dashboard diagram instance.IlvDashboardDiagram
instance,
IlvDashboardDiagram(IlvDashboardContext)
public void setQuadtreeEnabled(boolean enabled)
enabled
- If true
the use of the quadtree is enabled.public void prepareForEditing()
public boolean canEdit()
canEdit
in class IlvDiagrammer
true
if at least one object in the dashboard diagram
has been selected by the user.public void delete()
delete
in class IlvDiagrammer
IlvDashboardEditBar
,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void cut()
cut
in class IlvDiagrammer
IlvDashboardEditBar
,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void copy()
copy
in class IlvDiagrammer
IlvDashboardEditBar
,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void paste()
paste
in class IlvDiagrammer
IlvDashboardEditBar
,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public boolean canPaste()
canPaste
in class IlvDiagrammer
true
if data has been copied to the clipboard using
the cut
or copy
methods.paste()
,
copy()
,
cut()
,
Dashboard Diagram Events,
IlvDashboardEditBar
,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void duplicate()
Duplicated objects are painted on a higher layer than the selected objects and displaced to the bottom left.
duplicate
in class IlvDiagrammer
IlvDashboardEditBar
,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void selectAll()
selectAll
in class IlvDiagrammer
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public boolean canSelect()
canSelect
in class IlvDiagrammer
true
if this dashboard diagram contains at least
one symbol or background object.selectAll()
public boolean canGroup()
Note: The group operation can only be applied to background objects.
canGroup
in class IlvDiagrammer
true
if at least one background object is
currently selected by the user.IlvDiagrammer.canGroup()
public void group()
group
in class IlvDiagrammer
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public boolean canUngroup()
Note: The group operation can only be applied to background objects.
canUngroup
in class IlvDiagrammer
true
if background objects currently selected
by the user contain at least one grouped object.group()
,
canGroup()
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void ungroup()
This action is applicable to IlvGraphicSet
instances.
Note: The group operation can only be applied to background objects.
ungroup
in class IlvDiagrammer
canUngroup()
,
group()
,
canGroup()
,
IlvGraphicSet
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public boolean canAlign()
canAlign
in class IlvDiagrammer
true
if at least two objects are currently selected.IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public boolean canDistribute()
canDistribute
in class IlvDiagrammer
true
if at least three objects are currently
selected.IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void alignBottom()
The bounding box for a graphic object is the smallest rectangle containing the entire area of the object.
alignBottom
in class IlvDiagrammer
canAlign()
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void alignHorizontalCenter()
The bounding box for a graphic object is the smallest rectangle containing the entire area of the object.
alignHorizontalCenter
in class IlvDiagrammer
canAlign()
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void alignLeft()
The bounding box for a graphic object is the smallest rectangle containing the entire area of the object.
alignLeft
in class IlvDiagrammer
canAlign()
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void alignRight()
The bounding box for a graphic object is the smallest rectangle containing the entire area of the object.
alignRight
in class IlvDiagrammer
canAlign()
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void alignTop()
The bounding box for a graphic object is the smallest rectangle containing the entire area of the object.
alignTop
in class IlvDiagrammer
canAlign()
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void alignVerticalCenter()
The bounding box for a graphic object is the smallest rectangle containing the entire area of the object.
alignVerticalCenter
in class IlvDiagrammer
canAlign()
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void distributeHorizontally()
distributeHorizontally
in class IlvDiagrammer
canDistribute()
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void distributeVertically()
distributeVertically
in class IlvDiagrammer
canDistribute()
,
Events,
IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public IlvDashboardGraphicIterator getBackgroundGraphics()
public void writeDataFile(URL url) throws IlvDiagrammerException
IlvDiagrammer
If the current data source is an XML data source, the data source will be modified to point to the new URL, and the data in the diagram component will be written to the new file. Otherwise, the data source of the diagram component will be replaced by an XML data source pointing to the specified URL.
writeDataFile
in class IlvDiagrammer
url
- The URL to write the data to.IlvDiagrammerException
- If any other exception occurred while writing the diagram.public void writeData() throws IlvDiagrammerException
IlvDiagrammer
writeData
in class IlvDiagrammer
IlvDiagrammerException
- If any other exception occurred while writing the diagram.IlvDiagrammer.setDataFile(java.net.URL)
,
IlvDiagrammer.setProject(IlvDiagrammerProject)
public void writeDashboardFiles()
public void writeBackgroundFile(String file)
file
in Perforce JViews (.IVL) format.file
- The name of the output file.writeBackground(OutputStream)
public void writeBackground(OutputStream outputStream)
outputStream
in Perforce JViews (.IVL) format.outputStream
- The OutputStream
to write the background
objects to.writeBackgroundFile(String)
public void readBackground(InputStream inputStream)
inputStream
.inputStream
- The InputStream
containing the
background objects.IlvDashboardMenuBar
,
IlvDiagrammerMenuBar
,
IlvDashboardAction
,
IlvDiagrammerAction
public void writeProjectFile(URL projectURL) throws IlvDiagrammerException
IlvDiagrammer
writeProjectFile
in class IlvDiagrammer
projectURL
- the project URL.IlvDiagrammerException
- If exception occurred while writing the diagram.public void setProject(IlvDiagrammerProject project) throws IOException, IlvDiagrammerException
setProject
in class IlvDiagrammer
project
- An IlvDiagrammerProject
containing a logical
data source and a style sheet.IOException
- if there is a problem reading project
.IlvDiagrammerException
- if there is a problem rendering the dashboard diagram.IlvDiagrammerProject
public boolean isEmpty()
isEmpty
in class IlvDiagrammer
true
if this dashboard diagram contains no symbols or
background objects.public void setModified(boolean modified)
setModified
in class IlvDiagrammer
modified
- Set to true
to indicate that the dashboard
diagram has changed.public boolean isModified()
isModified
in class IlvDiagrammer
true
if the dashboard diagram has been
modified.public boolean isBackgroundObject(IlvGraphic graphic)
graphic
is a background object.graphic
- The graphic object to test.true
if graphic
is a background
object in this dashboard diagram.public void addSymbol(IlvDashboardSymbol symbol)
IlvDashboardSymbol
instance to this
dashboard diagram.symbol
- The symbol to be added to the diagram.public void removeSymbol(IlvDashboardSymbol symbol)
symbol
from this dashboard diagram.symbol
- The symbol to be removed from this dashboard diagram.public IlvDashboardSymbol getObjectSymbol(Object modelObject)
modelObject
.modelObject
- An object in the SDM Model.modelObject
. Returns
null
if no corresponding symbol exists in the Dashboard
Diagram.public IlvDashboardSymbol getGraphicSymbol(IlvGraphic graphic)
graphic
.graphic
- The graphic object whose symbol you wish to retrieve.graphic
. Returns
null
if no corresponding symbol exists in the dashboard
diagram.getObjectSymbol(Object)
public boolean hasSelectedSymbols()
true
if one or more symbols are selected.public IlvDashboardSymbolIterator getSelectedSymbols()
public IlvDashboardSymbol getSymbol(String id)
id
.id
- The id of the symbol to be returned.id
or null
if it
does not exist in this dashboard diagram instance.public URL getURL()
public void setURL(URL url)
url
- The url of the dashboard diagram.public void writeDashboard(URL url) throws IlvDiagrammerException
url
.url
- The URL to which the dashboard diagram contents will be
written.IlvDiagrammerException
- when this dashboard diagram cannot be
written to url
.public void readDashboard(URL url) throws IlvDiagrammerException
url
.url
- The URL from which the dashboard diagram contents are loaded.IlvDiagrammerException
- when this dashboard diagram cannot be
loaded from url
.readDashboard(Document, boolean, double, double)
public void readBinary(URL url) throws IOException, IlvDashboardException, ClassNotFoundException
url
- The URL from which the dashboard contents are loaded.IOException
- If there is a problem reading from url
.IlvDashboardException
- If there is a problem reading from
url
.ClassNotFoundException
- If there is a problem reading from
url
.public void readBinary(InputStream in) throws IOException, IlvDashboardException, ClassNotFoundException
in
- The input stream from which the dashboard contents are loaded.IOException
- if there is a problem reading in
.IlvDashboardException
- if there is a problem reading
in
.ClassNotFoundException
- if there is a problem reading
in
.public void writeBinary(URL url) throws IOException
url
- The URL of the output binary format file to which the
dashboard contents are written.IOException
public void writeBinary(OutputStream out) throws IOException
out
- The output stream to which the dashboard contents will be
written.IOException
public void readDashboard(Document document, boolean selection, double dx, double dy) throws IlvDiagrammerException
document
.
The contents of document
are added to the
existing background objects and symbols in this dashboard diagram.
Note: The IDs of the symbols loaded by this method may be changed automatically if they are already used.
document
- A valid dashboard diagram document.selection
- Set to true
so the new objects loaded into
the dashboard diagram are selected.dx
- The horizontal offset for the loaded objects.dy
- The vertical offset for the loaded objects.IlvDiagrammerException
- When the dashboard document cannot be read.protected boolean isValidDocument(Document document)
document
is a valid dashboard diagram document.document
- The document to test.true
if the root element of document
shows it to be a dashboard diagram file. This method
does not validate the XML contained in
document
.public boolean isUndoingEnabled()
true
if the undo mechanism for this dashboard
diagram is enabled.setUndoingEnabled(boolean)
public void setUndoingEnabled(boolean enabled)
enabled
- Set to true
to enabled
the undo mechanism of this dashboard diagram.public void addUndoableEdit(UndoableEdit edit)
edit
- An edit to the dashboard diagram that may be undone and
redone using the undo mechanism.public void setCompoundEditMode(boolean flag)
flag
- public boolean canUndo()
canUndo
in class IlvDiagrammer
true
if their are significant changes to be undone.public void undo()
undo
in class IlvDiagrammer
canUndo()
,
canRedo()
,
redo()
public boolean canRedo()
canRedo
in class IlvDiagrammer
true
if changes to the dashboard diagram have been
undone and can be redone.redo()
,
canUndo()
,
undo()
public void redo()
redo
in class IlvDiagrammer
canRedo()
,
canUndo()
,
undo()
public void setSelectManager(IlvDashboardKeySelectManager focusManager)
A selection manager is used to follow the symbols selected by the user in a dashboard diagram.
focusManager
- The selection manager to be set for this dashboard
diagram.getSelectManager()
public IlvDashboardKeySelectManager getSelectManager()
A selection manager is used to trace the symbols selected by the user in a dashboard diagram.
setSelectManager(IlvDashboardKeySelectManager)
public void clear()
public void setEditingAllowed(boolean editingAllowed)
Allows or forbids modifying (move, cut, copy, paste,) of the objects in the dashboard diagram.
setEditingAllowed
in class IlvDiagrammer
editingAllowed
- Set to true
so symbols, background
images and links contained in the dashboard diagram may be edited.IlvDiagrammer.setEditingAllowed(boolean)
public boolean isContained(IlvDashboardSymbol symbol)
symbol
- The symbol to test.true
if the symbol is contained in this dashboard diagram.public int getSymbolIndex(IlvDashboardSymbol symbol)
symbol
- The symbol to locate.public void setSymbolIndex(IlvDashboardSymbol symbol, int index)
symbol
- The symbol of which the index is to be changed.index
- The new index of the given symbol.public void addSymbolParameterListener(IlvDashboardSymbolParameterListener listener)
listener
- The symbol parameter listener.removeSymbolParameterListener(IlvDashboardSymbolParameterListener)
,
IlvDashboardSymbolParameterListener
,
IlvDashboardSymbolParameterEvent
public void removeSymbolParameterListener(IlvDashboardSymbolParameterListener listener)
listener
- The symbol parameter listener to be removed.addSymbolParameterListener(IlvDashboardSymbolParameterListener)
public void fireSymbolParameterChanged(IlvDashboardSymbol symbol, IlvDashboardSymbol.Parameter parameter, Object oldValue, Object newValue, String oldMapping, String newMapping)
parameterChanged
method
of all symbol parameter listeners of this dashboard diagram.symbol
- The symbol owning the modified parameter.parameter
- The symbol parameter that has been changed.oldValue
- The symbol parameter old value.newValue
- The symbol parameter new value.oldMapping
- The symbol parameter old mapping.newMapping
- The symbol parameter new mapping.public IlvManagerPrintingController getPrintingController()
Typical applications do not need to access the printing controller
directly, since all the printing tasks are handled automatically by
the methods IlvDiagrammer.print(boolean, boolean, ilog.views.diagrammer.IlvDiagrammer.PrinterExceptionHandler)
, IlvDiagrammer.pageSetup()
and so on.
You need to access the printing controller only if you want to
customize the printing process.
getPrintingController
in class IlvDiagrammer
IlvDiagrammer.print(boolean, boolean, ilog.views.diagrammer.IlvDiagrammer.PrinterExceptionHandler)
,
IlvDiagrammer.pageSetup()
,
IlvDiagrammer.printPreview()
,
IlvDiagrammer.setPrintArea()
,
IlvDiagrammer.clearPrintArea()
,
IlvDiagrammer.printToBitmap(java.io.File)
public void setBaseTextDirection(int btd)
IlvBidiUtil.COMPONENT_DIRECTION
:
the base text direction is the same as the
component orientation.
This is the default.
IlvBidiUtil.LEFT_TO_RIGHT
:
the base text direction is left-to-right.
IlvBidiUtil.RIGHT_TO_LEFT
:
the base text direction is right-to-left.
IlvBidiUtil.CONTEXTUAL_DIRECTION
:
the base test direction is determined from the text
that is displayed according to the standard Bidi
algorithm, if the text contains at least one character
with a strong left-to-right or right-to-left direction.
If the text doesn't contain any character with a strong
direction, the real text direction is determined from
the current component orientation.
setBaseTextDirection
in class IlvDiagrammer
btd
- The base text direction.getBaseTextDirection()
public int getBaseTextDirection()
IlvBidiUtil.COMPONENT_DIRECTION
:
the base text direction is the same as the
component orientation.
This is the default.
IlvBidiUtil.LEFT_TO_RIGHT
:
the base text direction is left-to-right.
IlvBidiUtil.RIGHT_TO_LEFT
:
the base text direction is right-to-left.
IlvBidiUtil.CONTEXTUAL_DIRECTION
:
the base test direction is determined from the text
that is displayed according to the standard Bidi
algorithm, if the text contains at least one character
with a strong left-to-right or right-to-left direction.
If the text doesn't contain any character with a strong
direction, the real text direction is determined from
the current component orientation.
getBaseTextDirection
in class IlvDiagrammer
setBaseTextDirection(int)
public boolean isLinkLayoutEnabled()
true
is returned.setLinkLayoutEnabled(boolean)
public void setLinkLayoutEnabled(boolean enabled)
When link layout is enabled, all the existing intermediate link points are replaced by ones specified by the link layout algorithm. When link layout is disabled, the intermediate link points installed by the existing link layout are kept.
enabled
- Set to true
to enable link layout.isLinkLayoutEnabled()
public ArrayList<Object> getSerializableProperties()
public void setSerializableProperties(ArrayList<Object> properties)
@Deprecated public IlvDashboardSymbolIterator getSymbols()
iterator()
instead.public Iterator<IlvDashboardSymbol> iterator()
Iterable
interface.iterator
in interface Iterable<IlvDashboardSymbol>
public void addStyleSheet(URL url) throws IOException, IlvDiagrammerException
IlvDashboardDiagram
.
In an IlvDashboardDiagram
object, CSS rules are internally
created and managed by the dashboard diagram. User rules are not
allowed. If you attempt to add a style sheet to this object an
UnsupportedOperationException
exception is raised.addStyleSheet
in class IlvDiagrammer
url
- The URL of the new style sheet.UnsupportedOperationException
- if you call this method on an IlvDashboardDiagram object.IOException
- If an I/O error occurred while reading the style sheet.IlvDiagrammerException
- If an error occurred while processing the style sheet.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.