public class IlpNetwork extends JComponent implements IlpInteractiveGraphicComponent
It is a graphical bean that encapsulates an IlpNetworkModel
,
an IlpNetworkView
and an IlpNetworkController
.
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
static String |
DefaultConfigurationFileName
The file name of the default configuration.
|
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
UPDATE_ALL_MASK, UPDATE_COMPONENT_MASK, UPDATE_NONE_MASK, UPDATE_OBJECTS_MASK
APPLIED_RULE_MASK, BAD_CLASS_MASK, BAD_PROP_MASK, BAD_PROP_WITH_STACK_MASK, CREATED_MASK, DECL_MASK, DECL_VALUE_MASK, FAILED_CONVERSIONS_MASK, TIME_REPORT_MASK, WARNING_PROP_MASK
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlpNetwork()
Creates an
IlpNetwork with a default context. |
IlpNetwork(IlpContext context)
Creates an
IlpNetwork with a default configuration. |
IlpNetwork(String configurationFileName)
Creates an
IlpNetwork with a configuration read from a CSS
file. |
IlpNetwork(String configurationFileName,
IlpContext context)
Creates an
IlpNetwork with a configuration read from a CSS
file. |
IlpNetwork(URL configurationURL)
Creates an
IlpNetwork with a configuration read from a CSS
file. |
IlpNetwork(URL configurationURL,
IlpContext context)
Creates an
IlpNetwork with a configuration read from a CSS
file. |
Modifier and Type | Method and Description |
---|---|
void |
addBackground(URL backgroundURL)
Adds a background on top of the other existing backgrounds.
|
void |
addBackgroundURL(URL backgroundURL)
Deprecated.
Use instead
addBackground(URL) |
void |
addPseudoClass(IlpObject bo,
String pseudo)
Adds a pseudoclass to the specified business object.
|
void |
addRootObject(IlpRepresentationObject object)
Adds a top-level object to the model.
|
void |
addSelectionObject(IlpObject object)
Adds the given
IlpObject to the selection. |
void |
clearSelection()
Clears the selection.
|
void |
dispose()
Cleans up the network, disconnects this component from the data source and
drops references to objects to help garbage collection.
|
void |
endChangingNetworkModel()
Deprecated.
Please use
IlpAbstractDataSource.endBatch()
instead. |
boolean |
ensureAtCenter(IlpObject object)
Scrolls the view in such a way that a given object
gets moved to the center of the view.
|
boolean |
ensureAtCenter(IlpRepresentationObject object)
Scrolls the view in such a way that a given representation object
gets moved to the center of the view.
|
boolean |
ensureVisible(IlpObject object)
Scrolls the view in such a way that a given object
becomes visible.
|
boolean |
ensureVisible(IlpRepresentationObject object)
Scrolls the view in such a way that a given representation object
becomes visible.
|
void |
fitToContents()
Modifies the zoom factor so that all objects are visible in the view.
|
void |
fitToContents(Insets insets)
Modifies the zoom factor so that all objects are visible in the view.
|
IlpNetworkAdapter |
getAdapter()
Returns the adapter connected to the network or creates a new one.
|
int |
getAutoLayoutIndex()
Returns the index of the graph layout that should
be executed automatically when the view contents
change.
|
List |
getBackgrounds()
Returns the list of URL instances that represent the current backgrounds.
|
IlpBackgroundSupport |
getBackgroundSupport()
Returns the background support object currently in use.
|
Collection |
getBackgroundURLs()
Deprecated.
Use instead
List getBackgrounds() |
String |
getConfigurationFileName()
Returns the name of the configuration file name.
|
IlpContext |
getContext()
Returns the context.
|
IlpNetworkController |
getController()
Returns the encapsulated controller.
|
IlpDataSource |
getDataSource()
Returns the data source that feeds the network.
|
IlpViewInteractor |
getDefaultViewInteractor()
Returns the default view interactor.
|
IlpFilter |
getFilter()
Returns the filter used to filter business objects.
|
IlvGraphLayout[] |
getGraphLayouts()
Returns the list of graph layouts that have been
configured to this view.
|
IlvGraphLayout |
getGraphLayouts(int index)
Returns the graph layout that is configured at the given
index.
|
IlpNetworkHandler |
getHandler()
Returns the handler for all controller operations.
|
JScrollBar |
getHorizontalScrollBar()
Returns the horizontal scroll bar that controls the viewport's horizontal view position.
|
IlvLabelLayout |
getLabelLayout()
Returns the label layout used in this network, or
null if
there is no label layout. |
IlvGraphLayout |
getLinkLayout()
Returns this view's graph layout for links.
|
IlpManagerView |
getManagerView()
Returns the main
IlvManagerView displayed by this view. |
IlpMutableNetworkModel |
getModel()
Returns the encapsulated model.
|
IlvGraphLayout |
getNodeLayout()
Returns this view's graph layout for nodes.
|
IlvJOverview |
getOverview()
Returns the overview window, if currently visible.
|
IlpPosition |
getPosition(IlpRepresentationObject object)
Returns the current position or shape of an object.
|
IlpPositionConverter |
getPositionConverter()
Returns the view's position converter.
|
IlpPositionSource |
getPositionSource(IlpRepresentationObject object)
Returns the source of the current position or shape of an object.
|
IlpProject |
getProject()
Returns the Network component project configuration.
|
IlvJScrollManagerView |
getScrollView()
Returns the scrollable view of this component.
|
IlpObject |
getSelectedObject()
Returns the first selected
IlpObject
from the collection of selected objects. |
Collection |
getSelectedObjects()
Returns the set of selected
IlpObject s. |
IlpNetworkSelectionModel |
getSelectionModel()
Returns the selection model.
|
IlpStyle |
getStyle()
Deprecated.
The Style API has been replaced by the Cascading Style Sheet
mechanism.
|
IlpGraphicViewStyleManager |
getStyleManager()
Deprecated.
The Style API has been replaced by the Cascading Style Sheet
mechanism. Please use the method
setStyleSheets
or getStyleSheets instead. |
int |
getStyleSheetDebugMask()
Returns the current debug level.
|
String[] |
getStyleSheets()
Returns the cascading style sheets.
|
String |
getStyleSheets(int index)
Returns one of the cascading style sheets.
|
JToolBar |
getToolBar()
Returns the view's toolbar.
|
JScrollBar |
getVerticalScrollBar()
Returns the vertical scroll bar that controls the viewport's horizontal view position.
|
IlpNetworkView |
getView()
Returns the encapsulated view.
|
IlpViewInteractor |
getViewInteractor()
Returns the interactor associated with the view.
|
Collection |
getVisibleObjects()
Returns an unmodifiable collection of the visible objects contained
in the network.
|
IlpZoomPolicy |
getZoomPolicy()
Returns the zoom policy currently in use.
|
boolean |
isHorizontalScrollBarVisible()
Returns true if the horizontal scrollbar is visible.
|
boolean |
isObjectSelected(IlpObject object)
|
boolean |
isOverviewVisible()
Returns
true if the overview is currently visible. |
boolean |
isToolBarVisible()
Tests if the toolbar is visible.
|
boolean |
isVerticalScrollBarVisible()
Returns
true if the vertical scrollbar is visible. |
boolean |
isVisible(URL backgroundURL)
Returns the visibility of a particular background.
|
void |
loadConfiguration(String configurationFileName)
Reads a configuration file and applies it to this network component.
|
void |
loadConfiguration(URL configurationURL)
Reads a configuration file and applies it to this network component.
|
void |
performLabelLayout()
Performs the label layout used in this network if there is one.
|
void |
refilter()
Reapplies the current filter to the adapter objects.
|
void |
reload(URL backgroundURL)
Deprecated.
Use instead
reloadBackground(URL) |
void |
reloadAllBackgrounds()
Deprecated.
Use instead
reloadBackgrounds() |
void |
reloadBackground(URL backgroundURL)
Reloads a particular background.
|
void |
reloadBackgrounds()
Reloads all backgrounds.
|
void |
removeAllBackgroundURLs()
Deprecated.
Use instead
removeBackgrounds() |
void |
removeBackground(URL backgroundURL)
Removes a background.
|
void |
removeBackgrounds()
Removes all backgrounds.
|
void |
removeBackgroundURL(URL backgroundURL)
Deprecated.
Use instead
removeBackground(URL) |
void |
removeObjectInteractors(IlpObject object)
Remove all the interactors associated with the given object.
|
void |
removeObjectInteractors(IlpRepresentationObject object)
Remove all the interactors associated with the given object.
|
void |
removePseudoClass(IlpObject bo,
String pseudo)
Removes a pseudoclass from the specified business object.
|
void |
removeRootObject(IlpRepresentationObject object)
Removes a top-level object from the model.
|
void |
removeSelectionObject(IlpObject object)
Removes the given
IlpObject from the selection. |
void |
resetConfiguration()
Applies the default configuration file to this network component.
|
void |
selectAll()
Puts all visible objects into the selection.
|
void |
setAdapter(IlpNetworkAdapter adapter)
Sets the adapter that connects the network to the data source.
|
void |
setAutoLayoutIndex(int index)
Sets the index of the graph layout that should be
executed automatically when the view contents change.
|
void |
setBackgrounds(List backgroundURLs)
Replaces the entire list of backgrounds.
|
void |
setBackgroundURLs(URL[] backgroundURLs)
Deprecated.
Use instead
setBackgrounds(List) |
void |
setConfigurationFileName(String configurationFileName)
Reads a configuration file and applies it to this network component.
|
void |
setController(IlpNetworkController controller)
Sets or replaces the encapsulated controller.
|
void |
setDataSource(IlpDataSource dataSource)
Sets the data source that feeds the network.
|
void |
setDefaultViewInteractor(IlpViewInteractor interactor)
Sets the default view interactor.
|
void |
setFilter(IlpFilter filter)
Sets the filter.
|
void |
setGraphLayouts(IlvGraphLayout[] layouts)
Changes the layouts that can be applied to this view.
|
void |
setGraphLayouts(int index,
IlvGraphLayout layout)
Sets a new graph layout to this view.
|
void |
setHandler(IlpNetworkHandler handler)
Sets the handler for all controller operations.
|
void |
setHorizontalScrollBarVisible(boolean set)
Shows or hides the horizontal scrollbar.
|
void |
setLabelLayout(IlvLabelLayout layout)
Sets the label layout in this network.
|
void |
setLinkLayout(IlvGraphLayout layout)
Changes the link layout of this view.
|
void |
setModel(IlpMutableNetworkModel model)
Sets or replaces the encapsulated model.
|
void |
setNodeLayout(IlvGraphLayout layout)
Changes the node layout of this view.
|
void |
setObjectInteractor(IlpObject object,
IlpAttribute attribute,
IlpObjectInteractor interactor)
Sets the interactor associated with the given object and attribute.
|
void |
setObjectInteractor(IlpObject object,
IlpObjectInteractor interactor)
Sets the interactor associated with the given object.
|
void |
setObjectInteractor(IlpRepresentationObject object,
IlpAttribute attribute,
IlpObjectInteractor interactor)
Sets the interactor associated with the given object and attribute.
|
void |
setObjectInteractor(IlpRepresentationObject object,
IlpObjectInteractor interactor)
Sets the interactor associated with the given object.
|
void |
setObjectInteractor(Object key,
IlpObjectInteractor interactor)
Sets the interactor associated with the given key.
|
void |
setOverviewVisible(boolean visible)
Makes the overview visible or invisible.
|
void |
setPosition(IlpRepresentationObject object,
IlpPosition position,
IlpPositionSource source)
Sets the current position or shape of an object.
|
void |
setPositionConverter(IlpPositionConverter positionConverter)
Changes the view's position converter.
|
void |
setProject(IlpProject proj)
Sets a Network component project configuration.
|
void |
setProject(URL projectURL)
Sets a Network component project configuration.
|
void |
setSelectedObject(IlpObject object)
Sets the selected
IlpObject . |
void |
setSelectedObjects(Collection objects)
Sets the set of selected
IlpObject s. |
void |
setSelectionModel(IlpNetworkSelectionModel selectionModel)
Sets the selection model.
|
void |
setStyleSheetDebugMask(int mask)
Sets the debug level while parsing the style sheets.
|
void |
setStyleSheets(int index,
String css)
Changes one of the cascading style sheets.
|
void |
setStyleSheets(int index,
String css,
int updateMask)
Changes one of the cascading style sheets.
|
void |
setStyleSheets(String[] css)
Sets the cascading style sheets.
|
void |
setStyleSheets(String[] css,
int updateMask)
Sets the cascading style sheets.
|
void |
setToolBarVisible(boolean visible)
Shows or hides the toolbar.
|
void |
setVerticalScrollBarVisible(boolean set)
Shows or hides the vertical scrollbar.
|
void |
setView(IlpNetworkView nview)
Sets or replaces the encapsulated view.
|
void |
setViewInteractor(IlpViewInteractor interactor)
Sets the interactor associated with the view.
|
void |
setVisible(URL backgroundURL,
boolean visible)
Changes the visibility of a particular background.
|
void |
setZoomPolicy(IlpZoomPolicy zoomPolicy)
Sets the zoom policy.
|
void |
startChangingNetworkModel()
Deprecated.
Please use
IlpAbstractDataSource.startBatch()
instead. |
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
addPropertyChangeListener, removePropertyChangeListener
public static String DefaultConfigurationFileName
public IlpNetwork(URL configurationURL, IlpContext context)
IlpNetwork
with a configuration read from a CSS
file.configurationURL
- The URL of the network configuration file.context
- The context used by this Network component.public IlpNetwork(URL configurationURL)
IlpNetwork
with a configuration read from a CSS
file.configurationURL
- The URL of the network configuration file.public IlpNetwork(String configurationFileName, IlpContext context)
IlpNetwork
with a configuration read from a CSS
file. The configuration file should be on the paths searched by
the context's URL access service.configurationFileName
- The name of the network configuration file.context
- The context used by this Network component.public IlpNetwork(String configurationFileName)
IlpNetwork
with a configuration read from a CSS
file. The configuration file should be on the paths searched by
the default URL access service.configurationFileName
- The name of the network configuration file.public IlpNetwork(IlpContext context)
IlpNetwork
with a default configuration.public IlpNetwork()
IlpNetwork
with a default context.public IlpMutableNetworkModel getModel()
public IlpNetworkView getView()
public IlpNetworkController getController()
public IlpContext getContext()
getContext
in interface IlpGraphicComponent
public void setModel(IlpMutableNetworkModel model)
Note: When the model changes, a
java.beans.PropertyChangeEvent
is fired for property name
"model"
.
public void setView(IlpNetworkView nview)
Note: When the view changes, a
java.beans.PropertyChangeEvent
is fired for property name
"view"
.
public void setController(IlpNetworkController controller)
Note: When the controller changes, a
java.beans.PropertyChangeEvent
is fired for property name
"controller"
.
public void dispose()
Note: After calling this function, this network is no longer functional.
public IlpDataSource getDataSource()
getDataSource
in interface IlpGraphicComponent
null
if none has been set.public void setDataSource(IlpDataSource dataSource)
IlpNetworkHandlerWithDataSource
if none has been set.setDataSource
in interface IlpGraphicComponent
public IlpNetworkAdapter getAdapter()
The adapter is lazily created the first time it is required.
setAdapter(ilog.cpl.network.IlpNetworkAdapter)
,
setDataSource(ilog.cpl.datasource.IlpDataSource)
public void setAdapter(IlpNetworkAdapter adapter)
IllegalArgumentException
- if the given adapter is null
.public void setFilter(IlpFilter filter)
IlpObject
s that
pass through the filter are added to the model.filter
- The filter to use to filter business objects. This parameter
may be null
meaning the business objects are
not filtered.public IlpFilter getFilter()
setFilter(IlpFilter)
public void refilter()
This is a convenience method for the filter feature that is supported by the adapter. It applies the current filter to the objects that are represented. This method allows you to change the filter criterion without having to set a new filter in the adapter.
IlpAbstractAdapter.refilter()
public void setProject(URL projectURL) throws IOException
The project configuration will be applied to the component, modifying the datasource and style sheet configuration.
projectURL
- New project configurationIOException
,
- if the project URL contains
invalid dataIOException
setDataSource(IlpDataSource)
,
setStyleSheets(String[])
,
getProject()
,
IlpProject
public void setProject(IlpProject proj)
The project configuration will be applied to the component, modifying the datasource and style sheet configuration.
proj
- New project configurationsetDataSource(IlpDataSource)
,
setStyleSheets(String[])
,
getProject()
,
IlpProject
public IlpProject getProject()
null
if a project
configuration has not been set in this component.IlpProject
public void loadConfiguration(String configurationFileName)
configurationFileName
- The name of the network configuration file.setStyleSheets(java.lang.String[])
public void loadConfiguration(URL configurationURL)
configurationURL
- The URL of the network configuration file.setStyleSheets(java.lang.String[])
public void resetConfiguration()
public String getConfigurationFileName()
public void setConfigurationFileName(String configurationFileName)
configurationFileName
- The name of the network configuration file.public void addRootObject(IlpRepresentationObject object)
public void removeRootObject(IlpRepresentationObject object)
public IlpManagerView getManagerView()
IlvManagerView
displayed by this view.public boolean isHorizontalScrollBarVisible()
public void setHorizontalScrollBarVisible(boolean set)
set
- If this parameter is true
, the scrollbar is shown.public boolean isVerticalScrollBarVisible()
true
if the vertical scrollbar is visible.public void setVerticalScrollBarVisible(boolean set)
set
- If this parameter is true
, the scrollbar is shown.public final IlvJScrollManagerView getScrollView()
public final JScrollBar getHorizontalScrollBar()
public final JScrollBar getVerticalScrollBar()
public IlpBackgroundSupport getBackgroundSupport()
@Deprecated public void addBackgroundURL(URL backgroundURL)
addBackground(URL)
This method delegates to the background support object.
If any problems occur they are logged.
public void addBackground(URL backgroundURL) throws IlpBackgroundHandlingException
This method delegates to the background support object.
IlpBackgroundHandlingException
@Deprecated public void removeBackgroundURL(URL backgroundURL)
removeBackground(URL)
This method delegates to the background support object.
If any problems occur they are logged.
public void removeBackground(URL backgroundURL) throws IlpBackgroundHandlingException
This method delegates to the background support object.
IlpBackgroundHandlingException
@Deprecated public void removeAllBackgroundURLs()
removeBackgrounds()
This method delegates to the background support object.
If any problems occur they are logged.
public void removeBackgrounds() throws IlpBackgroundHandlingException
This method delegates to the background support object.
IlpBackgroundHandlingException
@Deprecated public Collection getBackgroundURLs()
List getBackgrounds()
This method delegates to the background support object.
public List getBackgrounds()
This method delegates to the background support object.
@Deprecated public void setBackgroundURLs(URL[] backgroundURLs)
setBackgrounds(List)
This method delegates to the background support object.
If any problems occur they are logged.
public void setBackgrounds(List backgroundURLs) throws IlpBackgroundHandlingException
This method delegates to the background support object.
backgroundURLs
- The new list of backgrounds.IlpBackgroundHandlingException
public boolean isVisible(URL backgroundURL)
This method delegates to the background support object.
public void setVisible(URL backgroundURL, boolean visible)
This method delegates to the background support object.
@Deprecated public void reload(URL backgroundURL)
reloadBackground(URL)
This method delegates to the background support object.
If any problems occur they are logged.
public void reloadBackground(URL backgroundURL) throws IlpBackgroundHandlingException
This method delegates to the background support object.
IlpBackgroundHandlingException
@Deprecated public void reloadAllBackgrounds()
reloadBackgrounds()
This method delegates to the background support object.
If any problems occur they are logged.
public void reloadBackgrounds() throws IlpBackgroundHandlingException
This method delegates to the background support object.
IlpBackgroundHandlingException
public IlpZoomPolicy getZoomPolicy()
public void setZoomPolicy(IlpZoomPolicy zoomPolicy)
public void fitToContents()
public void fitToContents(Insets insets)
insets
- Describes the margins around the manager's contents.public IlvJOverview getOverview()
public boolean isOverviewVisible()
true
if the overview is currently visible.public void setOverviewVisible(boolean visible)
public JToolBar getToolBar()
public boolean isToolBarVisible()
public void setToolBarVisible(boolean visible)
public IlvGraphLayout getNodeLayout()
This method corresponds to getGraphLayouts(getAutoLayoutIndex())
null
if none has been specified.public void setNodeLayout(IlvGraphLayout layout)
layout
- A graph layout or null
.
Note: This method corresponds to:
view.setGraphLayouts(new IlvGraphLayout[] { layout }); view.setAutoLayoutIndex(0); view.optimizeLayout();
public IlvGraphLayout[] getGraphLayouts()
setGraphLayouts(IlvGraphLayout[])
public void setGraphLayouts(IlvGraphLayout[] layouts)
One of the graph layouts can be configured to run automatically
when the view contents change. The layout that should be
run automatically has to be defined using method
setAutoLayoutIndex(int)
.
The other layouts can be executed on demand using
method IlpGraphView.performAttachedLayout(int)
Note: For performance reasons this method does not perform any
of the layouts automatically. Once you have configured the layouts
and the index of the layout that shall be performed automatically,
you can run the layout using IlpGraphView.optimizeLayout()
.
layouts
- Graph layoutsgetGraphLayouts()
,
setAutoLayoutIndex(int)
public IlvGraphLayout getGraphLayouts(int index)
index
- Layout indexnull
if none is defined.public void setGraphLayouts(int index, IlvGraphLayout layout)
Note: For performance reasons this method does not perform any
of the layouts automatically. Once you have configured the layouts
and the index of the layout that shall be performed automatically,
you can run the layout using IlpGraphView.optimizeLayout()
.
index
- Layout indexlayout
- Layoutpublic int getAutoLayoutIndex()
-1
if none
shall be executed automatically.public void setAutoLayoutIndex(int index)
Note: For performance reasons this method does not perform any
of the layouts automatically. Once you have configured the layouts
and the index of the layout that shall be performed automatically,
you can run the layout using IlpGraphView.optimizeLayout()
.
Default value is 0.
index
- Layout indexpublic IlvGraphLayout getLinkLayout()
null
if none has been specified.public void setLinkLayout(IlvGraphLayout layout)
layout
- A graph layout or null
.public IlvLabelLayout getLabelLayout()
null
if
there is no label layout.IlvLabelLayout
.public void performLabelLayout()
public void setLabelLayout(IlvLabelLayout layout)
layout
- An IlvLabelLayout
.@Deprecated public IlpGraphicViewStyleManager getStyleManager()
setStyleSheets
or getStyleSheets
instead.@Deprecated public IlpStyle getStyle()
Equivalent to getStyleManager().getStyle()
.
public IlpPosition getPosition(IlpRepresentationObject object)
public IlpPositionSource getPositionSource(IlpRepresentationObject object)
public void setPosition(IlpRepresentationObject object, IlpPosition position, IlpPositionSource source)
object
- The object.position
- The new position.source
- Who sets it.public IlpPositionConverter getPositionConverter()
public void setPositionConverter(IlpPositionConverter positionConverter)
public IlpNetworkSelectionModel getSelectionModel()
public void setSelectionModel(IlpNetworkSelectionModel selectionModel)
public IlpObject getSelectedObject()
IlpObject
from the collection of selected objects.
Returns null
if there is no selected object.getSelectedObject
in interface IlpObjectSelectionModel
public Collection getSelectedObjects()
IlpObject
s.
The set should be ordered if the component implementing this interface
supports an ordered selection.
Returns an empty set if there is no selected object.getSelectedObjects
in interface IlpObjectSelectionModel
IlpObject
s.public boolean isObjectSelected(IlpObject object)
isObjectSelected
in interface IlpObjectSelectionModel
object
- The object which may be selected.public void addSelectionObject(IlpObject object)
IlpObject
to the selection.
This has no effect if the given object is null
.addSelectionObject
in interface IlpObjectSelectionModel
object
- The object that will be added to the selection.public void removeSelectionObject(IlpObject object)
IlpObject
from the selection.
This has no effect if the given object is null
.removeSelectionObject
in interface IlpObjectSelectionModel
object
- The object that will be removed from the selection.public void setSelectedObject(IlpObject object)
IlpObject
.
This has no effect if the given object is already selected.setSelectedObject
in interface IlpObjectSelectionModel
object
- The object that will become the selection.public void setSelectedObjects(Collection objects)
IlpObject
s.setSelectedObjects
in interface IlpObjectSelectionModel
objects
- The collection of objects that will become the selection.public void clearSelection()
clearSelection
in interface IlpObjectSelectionModel
public void selectAll()
public Collection getVisibleObjects()
IlpRepresentationObject
s.public boolean ensureAtCenter(IlpRepresentationObject object)
true
if the object is visible, false
otherwise.public boolean ensureAtCenter(IlpObject object)
true
if the object is visible, false
otherwisepublic boolean ensureVisible(IlpRepresentationObject object)
true
if the object is visible, false
otherwisepublic boolean ensureVisible(IlpObject object)
true
if the object is visible, false
otherwisepublic IlpViewInteractor getDefaultViewInteractor()
getDefaultViewInteractor
in interface IlpInteractiveGraphicComponent
public void setDefaultViewInteractor(IlpViewInteractor interactor)
Note: Setting the default view interactor does not change the currently active view interactor immediately. It has an effect on the view interactor only the next time an interactor detaches itself.
setDefaultViewInteractor
in interface IlpInteractiveGraphicComponent
setViewInteractor(ilog.cpl.interactor.IlpViewInteractor)
public IlpViewInteractor getViewInteractor()
getViewInteractor
in interface IlpInteractiveGraphicComponent
public void setViewInteractor(IlpViewInteractor interactor)
setViewInteractor
in interface IlpInteractiveGraphicComponent
public void setObjectInteractor(Object key, IlpObjectInteractor interactor)
public void setObjectInteractor(IlpRepresentationObject object, IlpObjectInteractor interactor)
public void setObjectInteractor(IlpObject object, IlpObjectInteractor interactor)
public void setObjectInteractor(IlpRepresentationObject object, IlpAttribute attribute, IlpObjectInteractor interactor)
public void setObjectInteractor(IlpObject object, IlpAttribute attribute, IlpObjectInteractor interactor)
public void removeObjectInteractors(IlpRepresentationObject object)
public void removeObjectInteractors(IlpObject object)
public void setHandler(IlpNetworkHandler handler)
The default handler is the controller itself. A good handler in
conjunction with an IlpNetworkAdapter
is the
IlpNetworkHandlerWithDataSource
.
IlpNetworkHandlerWithDataSource
,
getHandler()
public IlpNetworkHandler getHandler()
This method returns the handler if set through setHandler
.
The method returns null
if individual handlers have been
installed for object-related, move/reshape, container, loading or editing
operations.
null
.setHandler(ilog.cpl.network.IlpNetworkHandler)
,
IlpNetworkController.getHandler()
,
IlpGraphController.getNodeHandler()
,
IlpGraphController.getPositionHandler()
,
IlpGraphController.getExpansionHandler()
,
IlpGraphController.getLoadHandler()
@Deprecated public void startChangingNetworkModel()
IlpAbstractDataSource.startBatch()
instead.fireNetworkModelEvent
delay the events until the next call to
endChangingNetworkModel
.endChangingNetworkModel()
@Deprecated public void endChangingNetworkModel()
IlpAbstractDataSource.endBatch()
instead.startChangingNetworkModel
.startChangingNetworkModel()
public void setStyleSheets(String[] css) throws IlvStylingException
Each element can be a URL, a filename, or the style sheet string directly. The order is by priority (the last CSS takes precedence).
setStyleSheets
in interface IlvStylable
css
- An array of strings containing the URLs, the file names of
CSS files (usually with a .css
suffix) or CSS
extracts directly.IlvStylingException
getStyleSheets()
public void setStyleSheets(String[] css, int updateMask) throws IlvStylingException
Each element can be a URL, a filename, or directly the style sheet string. The order is by priority (the last CSS takes precedence).
setStyleSheets
in interface IlpStylable
css
- An array of strings containing the URLs.
the file names of CSS files (usually with a
.css
suffix) or the CSS extracts directly.updateMask
- Flag that indicates whether the component and/or the
business objects must be updated to use this new
configuration. When
IlpStylable.UPDATE_COMPONENT_MASK
is set,the view and adapter are reconfigured with the
new style sheets.
When
IlpStylable.UPDATE_OBJECTS_MASK
is
set, the representation objects that are displayed in
this view are reconfigured according to the new style
sheets.IlvStylingException
IlpStylable.UPDATE_COMPONENT_MASK
,
IlpStylable.UPDATE_OBJECTS_MASK
,
getStyleSheets()
public void setStyleSheets(int index, String css) throws IlvStylingException
This method is an alternative to
setStyleSheets(java.lang.String[])
.
It lets you change one particular style sheet file, instead of setting
the whole style sheet array.
setStyleSheets
in interface IlvStylable
index
- The index of the style sheet to replace.css
- The URL, file name of the new style sheet file or CSS
extract directly.IlvStylingException
setStyleSheets(java.lang.String[])
,
getStyleSheets(int)
public void setStyleSheets(int index, String css, int updateMask) throws IlvStylingException
This method is an alternative to
setStyleSheets(java.lang.String[])
. It lets you change one
particular style sheet file, instead of setting the whole style sheet
array. When this method is used, you can indicate whether you want to
reapply this configuration immediately to the view, the adapter and all the
objects that are already displayed in the component.
setStyleSheets
in interface IlpStylable
index
- The index of the style sheet to replace.css
- The URL, file name or CSS extract of the new style
sheet.updateMask
- Flag that indicates whether the component and/or the
business objects must be updated to use this new
configuration.
When
IlpStylable.UPDATE_COMPONENT_MASK
is set, the view and adapter are reconfigured with the
new style sheets. When
IlpStylable.UPDATE_OBJECTS_MASK
is set, the representation objects that are displayed
in this view are reconfigured according to the new
style sheets.IlvStylingException.
IlvStylingException
IlpStylable.UPDATE_COMPONENT_MASK
,
IlpStylable.UPDATE_OBJECTS_MASK
,
getStyleSheets(int)
public String[] getStyleSheets()
getStyleSheets
in interface IlvStylable
setStyleSheets(String[])
public String getStyleSheets(int index)
getStyleSheets
in interface IlvStylable
index
- The position of the cascading style sheet to return.index
-th position in the style sheet array.setStyleSheets(int, String)
public void setStyleSheetDebugMask(int mask)
setStyleSheets(java.lang.String[])
to debug problems during
configuration.setStyleSheetDebugMask
in interface IlvStylable
mask
- The debug mask, expressed as an OR combination of the
predefined flags.setStyleSheets(java.lang.String[])
,
getStyleSheetDebugMask()
,
IlvStylable.APPLIED_RULE_MASK
,
IlvStylable.BAD_CLASS_MASK
,
IlvStylable.BAD_PROP_MASK
,
IlvStylable.BAD_PROP_WITH_STACK_MASK
,
IlvStylable.CREATED_MASK
,
IlvStylable.DECL_MASK
,
IlvStylable.DECL_VALUE_MASK
,
IlvStylable.FAILED_CONVERSIONS_MASK
,
IlvStylable.TIME_REPORT_MASK
,
IlvStylable.WARNING_PROP_MASK
public int getStyleSheetDebugMask()
getStyleSheetDebugMask
in interface IlvStylable
setStyleSheetDebugMask(int)
public void addPseudoClass(IlpObject bo, String pseudo)
Pseudoclasses are used to modify the appearance of an object depending on state information, such as whether the object is selected, expanded, and so on.
The pseudoclasses expanded
, selected
, and
focus
are automatically used to customize the objects.
Add your own pseudoclasses to create new types of customization
that depend on the graphic view characteristics.
bo
- The business object.pseudo
- A string that identifies a pseudoclass
to add to the classes already associated with
the data object.IlpGraphView.addPseudoClass(ilog.cpl.model.IlpObject, java.lang.String)
public void removePseudoClass(IlpObject bo, String pseudo)
Pseudoclasses are used to modify the appearance of an object depending on state information, such as whether the object is selected, expanded, and so on.
The pseudoclasses expanded
, selected
, and
focus
are automatically used to customize the objects.
Add your own pseudoclasses to create new types of customization
that depend on the graphic view characteristics.
bo
- The business object.pseudo
- A string that identifies a pseudoclass
to remove from the classes that are associated with
the data object.IlpGraphView.removePseudoClass(ilog.cpl.model.IlpObject, java.lang.String)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.