public class IlpEquipment extends JComponent implements IlpInteractiveGraphicComponent
It does not have independent functionality, but is convenient to use. It creates and connects all MVC components needed to display an equipment.
By default the equipment component creates the following elements:
IlpEquipmentView
),
responsible for displaying equipment nodes and links.IlpEquipmentModel
),
containing the information that is displayed in the view.IlpEquipmentController
),
containing the behavior of the component, and information about
interactors for the view and its displayed objects.IlpEquipmentAdapter
),
responsible for converting business objects present in a data source to
representation objects that can be displayed in the component.An equipment component can be customized using cascading
style sheets (CSS), thereby allowing the configuration of the view,
the controller and the adapter elements. If nothing is defined, a
default configuration is applied
(see DefaultConfigurationFileName
).
IlpDefaultDataSource
,
IlpViewRenderer
,
IlpToolBarRenderer
,
IlpInteractorRenderer
,
Serialized FormJComponent.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 |
---|
IlpEquipment()
Creates an
IlpEquipment with a default context
and default equipment configuration. |
IlpEquipment(IlpContext context)
Creates an
IlpEquipment based on a context with
the default equipment configuration. |
IlpEquipment(String configurationFileName)
Creates an
IlpEquipment with a configuration read from
a CSS file. |
IlpEquipment(String configurationFileName,
IlpContext context)
Creates an
IlpEquipment with a configuration read from
a CSS file. |
IlpEquipment(URL configurationURL)
Creates an
IlpEquipment with a configuration read from
a CSS file. |
IlpEquipment(URL configurationURL,
IlpContext context)
Creates an
IlpEquipment 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 equipment, disconnects the component from the data source and
drops references to objects to help garbage collection.
|
void |
endChangingEquipmentModel()
Deprecated.
Please use
IlpAbstractDataSource.endBatch()
instead. |
void |
ensureAtCenter(IlpObject object)
Scrolls the view in such a way that a given business object
gets moved to the center of the view.
|
void |
ensureAtCenter(IlpRepresentationObject object)
Scrolls the view in such a way that a given representation object
gets moved to the center of the view.
|
void |
ensureVisible(IlpObject object)
Scrolls the view in such a way that a given business object
becomes visible.
|
void |
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.
|
IlpEquipmentAdapter |
getAdapter()
Returns the adapter connected to the component 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.
|
IlpEquipmentController |
getController()
Returns the encapsulated controller.
|
IlpDataSource |
getDataSource()
Returns the data source that feeds the equipment.
|
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.
|
IlpEquipmentHandler |
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 equipment 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. |
IlpMutableEquipmentModel |
getModel()
Returns the encapsulated model.
|
IlvGraphLayout |
getNodeLayout()
Returns graph layout of nodes for this view.
|
IlvJOverview |
getOverview()
Returns the overview window, if it is currently visible.
|
IlpPosition |
getPosition(IlpRepresentationObject object)
Returns the current position or shape of an object.
|
IlpPositionConverter |
getPositionConverter()
Returns the position converter of the view.
|
IlpPositionSource |
getPositionSource(IlpRepresentationObject object)
Returns the source of the current position or shape of an object.
|
IlpProject |
getProject()
Returns the 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. |
IlpEquipmentSelectionModel |
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.
|
IlpEquipmentView |
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 equipment.
|
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 equipment component.
|
void |
loadConfiguration(URL configurationURL)
Reads a configuration file and applies it to this equipment components.
|
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)
Removes 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 equipment component.
|
void |
selectAll()
Puts all visible objects into the selection.
|
void |
setAdapter(IlpEquipmentAdapter adapter)
Sets the adapter that connects the equipment 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 equipment component.
|
void |
setController(IlpEquipmentController controller)
Sets or replaces the encapsulated controller.
|
void |
setDataSource(IlpDataSource dataSource)
Sets the data source that feeds the equipment.
|
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(IlpEquipmentHandler 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 equipment.
|
void |
setLinkLayout(IlvGraphLayout layout)
Changes the link layout of this view.
|
void |
setModel(IlpMutableEquipmentModel 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 position converter of the view.
|
void |
setProject(IlpProject proj)
Sets the component project configuration.
|
void |
setProject(URL projectURL)
Sets a Equipment component project configuration.
|
void |
setSelectedObject(IlpObject object)
Sets the selected
IlpObject . |
void |
setSelectedObjects(Collection objects)
Sets the set of selected
IlpObject s. |
void |
setSelectionModel(IlpEquipmentSelectionModel 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(IlpEquipmentView view)
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 |
startChangingEquipmentModel()
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 IlpEquipment(URL configurationURL, IlpContext context)
IlpEquipment
with a configuration read
from a CSS file.configurationURL
- The URL of the equipment configuration file.context
- The context used by this Equipment component.public IlpEquipment(URL configurationURL)
IlpEquipment
with a configuration read from
a CSS file.configurationURL
- The URL of the equipment configuration file.public IlpEquipment(String configurationFileName, IlpContext context)
IlpEquipment
with a configuration read from
a CSS file.
The configuration file should be on the paths searched by the URL access service of the context.
configurationFileName
- The name of the equipment configuration file.context
- The context used by this equipment component.public IlpEquipment(String configurationFileName)
IlpEquipment
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 equipment configuration file.public IlpEquipment(IlpContext context)
IlpEquipment
based on a context with
the default equipment configuration.context
- The context used by this equipment component.public IlpEquipment()
IlpEquipment
with a default context
and default equipment configuration.public IlpMutableEquipmentModel getModel()
public IlpEquipmentView getView()
public IlpEquipmentController getController()
public IlpContext getContext()
getContext
in interface IlpGraphicComponent
public void setModel(IlpMutableEquipmentModel model)
model
- New equipment modelIllegalArgumentException
- in case of null
model.
Note: When the model changes, a
java.beans.PropertyChangeEvent
is fired for property name
"model"
.
public void setView(IlpEquipmentView view)
view
- New equipment viewIllegalArgumentException
- in cas of null
view.
Note: When the view changes, a
java.beans.PropertyChangeEvent
is fired for property name
"view"
.
public void setController(IlpEquipmentController controller)
controller
- New equipment controllerIllegalArgumentException
- in cas of null
controller.
Note: When the controller changes, a
java.beans.PropertyChangeEvent
is fired for property name
"controller"
.
public IlpDataSource getDataSource()
getDataSource
in interface IlpGraphicComponent
null
if none has been set.public void setDataSource(IlpDataSource dataSource)
setDataSource
in interface IlpGraphicComponent
public IlpEquipmentAdapter getAdapter()
The adapter is lazily created the first time it is required.
setAdapter(ilog.cpl.equipment.IlpEquipmentAdapter)
,
setDataSource(ilog.cpl.datasource.IlpDataSource)
public void setAdapter(IlpEquipmentAdapter adapter)
IllegalArgumentException
- if the given adapter is null
.public void setFilter(IlpFilter filter)
The data source objects are filtered, so only 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.IlpAbstractAdapter.setFilter(ilog.cpl.util.IlpFilter)
public IlpFilter getFilter()
setFilter(IlpFilter)
,
IlpAbstractAdapter.getFilter()
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 configurationIlpProject
,
setDataSource(IlpDataSource)
,
setStyleSheets(String[])
,
getProject()
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 equipment configuration file.setStyleSheets(java.lang.String[])
public void loadConfiguration(URL configurationURL)
configurationURL
- The URL of the equipment configuration file.setStyleSheets(java.lang.String[])
public void resetConfiguration()
public String getConfigurationFileName()
public void setConfigurationFileName(String configurationFileName)
configurationFileName
- The name of the equipment configuration file.public void addRootObject(IlpRepresentationObject object)
public void removeRootObject(IlpRepresentationObject object)
public IlpManagerView getManagerView()
IlvManagerView
displayed by this view.public boolean isHorizontalScrollBarVisible()
true
if the horizontal scrollbar is visible.public void setHorizontalScrollBarVisible(boolean set)
set
- If this parameter is true
, the scrollbar is shown.IlpGraphView.setHorizontalScrollBarVisible(boolean)
,
IlpViewRenderer
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.IlpGraphView.setVerticalScrollBarVisible(boolean)
,
IlpViewRenderer
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()
IlpGraphView.getZoomPolicy()
,
IlpZoomingRenderer
public void setZoomPolicy(IlpZoomPolicy zoomPolicy)
public void fitToContents()
IlpGraphView.fitToContents()
public void fitToContents(Insets insets)
insets
- Describes the margins around the content of the manager.IlpGraphView.fitToContents(Insets)
public IlvJOverview getOverview()
IlpGraphView.getOverview()
,
IlpOverviewRenderer
public boolean isOverviewVisible()
true
if the overview is currently visible.public void setOverviewVisible(boolean visible)
public JToolBar getToolBar()
IlpGraphView.getToolBar()
,
IlpToolBarRenderer
public boolean isToolBarVisible()
public void setToolBarVisible(boolean visible)
public IlvGraphLayout getNodeLayout()
This method corresponds to getGraphLayouts(getAutoLayoutIndex())
null
, if none has been specified.IlpGraphView.getNodeLayout()
,
IlpGraphLayoutRenderer
public void setNodeLayout(IlvGraphLayout layout)
Note: This method corresponds to:
view.setGraphLayouts(new IlvGraphLayout[] { layout }); view.setAutoLayoutIndex(0); view.optimizeLayout();
layout
- A graph layout or null
.IlpGraphView.setNodeLayout(ilog.views.graphlayout.IlvGraphLayout)
,
IlpGraphLayoutRenderer
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)
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
.IlpGraphView.getLabelLayout()
,
IlpLabelLayoutRenderer
public void setLabelLayout(IlvLabelLayout layout)
layout
- An IlvLabelLayout
.IlpGraphView.setLabelLayout(ilog.views.graphlayout.labellayout.IlvLabelLayout)
,
IlpLabelLayoutRenderer
@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.IlpGraphView.setPosition(ilog.cpl.model.IlpRepresentationObject, ilog.cpl.graphic.IlpPosition, ilog.cpl.graphic.IlpPositionSource)
public IlpPositionConverter getPositionConverter()
public void setPositionConverter(IlpPositionConverter positionConverter)
public IlpEquipmentSelectionModel getSelectionModel()
public void setSelectionModel(IlpEquipmentSelectionModel selectionModel)
public IlpObject getSelectedObject()
IlpObject
from the collection of selected objects.
Returns null
if there is no selected object.getSelectedObject
in interface IlpObjectSelectionModel
IlpGraphView.getSelectedObject()
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.IlpGraphView.getSelectedObjects()
public boolean isObjectSelected(IlpObject object)
isObjectSelected
in interface IlpObjectSelectionModel
object
- The object which may be selected.IlpGraphView.isObjectSelected(ilog.cpl.model.IlpObject)
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.IlpGraphView.addSelectionObject(ilog.cpl.model.IlpObject)
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.IlpGraphView.removeSelectionObject(ilog.cpl.model.IlpObject)
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.IlpGraphView.setSelectedObject(ilog.cpl.model.IlpObject)
public void setSelectedObjects(Collection objects)
IlpObject
s.setSelectedObjects
in interface IlpObjectSelectionModel
objects
- The collection of objects that will become the selection.IlpGraphView.setSelectedObjects(java.util.Collection)
public void clearSelection()
clearSelection
in interface IlpObjectSelectionModel
IlpGraphView.clearSelection()
public void selectAll()
IlpGraphView.selectAll()
public Collection getVisibleObjects()
IlpRepresentationObject
s.IlpGraphView.getVisibleObjects()
public void ensureAtCenter(IlpObject object)
public void ensureAtCenter(IlpRepresentationObject object)
public void ensureVisible(IlpObject object)
IlpGraphView.ensureVisible(IlpObject)
public void ensureVisible(IlpRepresentationObject object)
public IlpViewInteractor getDefaultViewInteractor()
getDefaultViewInteractor
in interface IlpInteractiveGraphicComponent
IlpAbstractGraphicController.getDefaultViewInteractor()
,
IlpInteractorRenderer
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.
public IlpViewInteractor getViewInteractor()
getViewInteractor
in interface IlpInteractiveGraphicComponent
IlpAbstractGraphicController.getViewInteractor()
,
IlpInteractorRenderer
public void setViewInteractor(IlpViewInteractor interactor)
setViewInteractor
in interface IlpInteractiveGraphicComponent
IlpGraphController.setViewInteractor(ilog.cpl.interactor.IlpViewInteractor)
,
IlpInteractorRenderer
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(IlpEquipmentHandler handler)
The default handler is the controller itself. A good handler in
conjunction with an IlpEquipmentAdapter
is the
IlpEquipmentHandlerWithDataSource
.
IlpEquipmentHandlerWithDataSource
,
getHandler()
public IlpEquipmentHandler 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.equipment.IlpEquipmentHandler)
,
IlpEquipmentController.getHandler()
,
IlpGraphController.getNodeHandler()
,
IlpGraphController.getPositionHandler()
,
IlpGraphController.getExpansionHandler()
,
IlpGraphController.getLoadHandler()
@Deprecated public void startChangingEquipmentModel()
IlpAbstractDataSource.startBatch()
instead.fireEquipmentModelEvent
delay the events until the next call to
endChangingEquipmentModel
.endChangingEquipmentModel()
@Deprecated public void endChangingEquipmentModel()
IlpAbstractDataSource.endBatch()
instead.startChangingEquipmentModel
.startChangingEquipmentModel()
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 over).
setStyleSheets
in interface IlpStylable
css
- An array of strings containing the URLs,
the file names of CSS files (usually with a .css
suffix) or CSS extracts directly.updateMask
- Flag that indicates if 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 represented 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
- A 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(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 move from the classes associated with
the data object.IlpGraphView.removePseudoClass(ilog.cpl.model.IlpObject, java.lang.String)
public void dispose()
Note:After calling this function, the equipment is no longer functional.
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.