public abstract class IlpGraphView extends JComponent implements IlpStylableViewsView, ilog.cpl.graphic.css.internal.IlpCSSGraphicView, IlpBackgroundProvider
IlpGraphModel
in a Perforce JViews grapher.
Note:Links cannot be displayed unless both of their end
nodes are visible in the same IlpGraphModel
.
IlpGraphModel
,
IlpGraphController
,
Serialized FormModifier and Type | Class and Description |
---|---|
class |
IlpGraphView.VisibleModelConnector
Connector between the graph view and the visible model.
|
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected IlpGraphicViewStyleManager |
configuration
Deprecated.
|
static int |
SCROLLBAR_UNIT_INCREMENT
Increment used by scrollbars
Default value: 5
|
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
Modifier | Constructor and Description |
---|---|
protected |
IlpGraphView(IlpContext context)
Creates a view.
|
Modifier and Type | Method and Description |
---|---|
protected void |
activateDefaultViewInteractorName()
Activates the defaultViewInteractorName on the current toolbar.
|
void |
addBackground(URL backgroundURL)
Adds a background on top of the other existing backgrounds.
|
void |
addBackgroundURL(URL backgroundURL)
Deprecated.
Use instead
addBackground(URL) |
void |
addDebugListener(Frame frame)
Print all kinds of AWT events.
|
void |
addGraphRendererListener(GraphRendererListener listener)
Adds a listener to graph renderer change events.
|
void |
addNodeExpansionListener(NodeExpansionListener listener)
Adds the specified listener to receive events from the view when
a subnetwork is collapsed or expanded.
|
void |
addPendingContainerCollapse(IlpRepresentationObject object) |
void |
addPseudoClass(IlpObject bo,
String pseudo)
Adds a pseudoclass to the specified business object.
|
void |
addPseudoClass(IlpRepresentationObject ro,
String pseudo)
Adds a pseudoclass to the specified representation object.
|
void |
addSelectionObject(IlpObject object)
Adds the given
IlpObject to the selection. |
void |
addSelectionRepresentationObject(IlpRepresentationObject object)
Adds the given
IlpRepresentationObject to the
selection. |
void |
addVisibleChildren(IlpRepresentationObject object)
Adds the given object to the visible model.
|
void |
clearSelection()
Clears the selection.
|
void |
collapseObject(IlpRepresentationObject object)
Puts an object into the collapsed state, if possible.
|
protected IlvGrapher |
createGrapher(IlpContext context)
Creates the
IlvGrapher used by this view. |
protected abstract IlpGraphSelectionModel |
createGraphSelectionModel()
This method creates the default selection model.
|
protected IlpManagerView |
createManagerView(IlvManager grapher,
IlpContext context)
Creates the
IlvManagerView used by this view. |
Object |
createToolBarButtonFromAction(Action a)
Creates a toolbar button to execute the given action.
|
protected abstract ilog.cpl.graph.css.internal.IlpGraphViewCSSContext |
createViewCSSContext()
Creates the CSS context that will provide support for
Cascading Style Sheets in this graph view.
|
protected abstract ilog.cpl.graph.internal.IlpGraphVisibleModel |
createVisibleModel()
Create a new visible model.
|
void |
defaultCollapseObject(IlpRepresentationObject object) |
void |
defaultExpandObject(IlpRepresentationObject object) |
boolean |
defaultIsExpanded(IlpRepresentationObject object) |
void |
dispose()
Cleans up the view, and drops references to objects to
help garbage collection.
|
void |
doUpdateGraphic(IlpRepresentationObject object,
IlpGraphic g)
After all checks have been done, update an object.
|
void |
enableLinkLayoutRendererConfiguration() |
void |
endDelayingUpdates()
Undoes a call to
startDelayingUpdates() . |
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.
|
void |
ensureVisible()
Scrolls the view in such a way that the contents becomes visible,
as far as possible.
|
boolean |
ensureVisible(Collection objects)
Scrolls the view in such a way that a given list of representation
objects becomes visible.
|
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 |
expandObject(IlpRepresentationObject object)
Puts an object into the expanded state.
|
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.
|
IlpAttribute |
getAttribute(IlpPoint viewLocation)
Returns the
IlpAttribute object at the given position
in this object. |
int |
getAutoLayoutIndex()
Returns the index of the graph layout that should
be executed automatically when the view contents
change.
|
int |
getAutoLayoutIndex(IlpRepresentationObject ro)
Returns the index of the graph layout that should
be executed automatically in the subnetwork when the view
contents change.
|
IlvManagerLayer |
getBackgroundLayer(URL backgroundURL)
Deprecated.
Use instead
List getBackgroundLayers(URL) |
List |
getBackgroundLayers(URL backgroundURL)
Returns a List with the IlvManagerLayer instances that compose the provided
URL.
|
List |
getBackgrounds()
Returns the list of URL instances that represent the current backgrounds.
|
ilog.cpl.graph.css.renderer.IlpBackgroundsRenderer |
getBackgroundsRenderer() |
IlpBackgroundSupport |
getBackgroundSupport()
Returns the background support object currently in use.
|
Collection |
getBackgroundURLs()
Deprecated.
Use instead
List getBackgrounds() |
IlvRect |
getBaseRectangle(IlpRepresentationObject object)
Returns the base rectangle of the given representation object in
manager view coordinates.
|
IlvRect |
getBoundingBox(IlpRepresentationObject object)
Returns the bounding box of the given representation object in
manager view coordinates.
|
IltCompositeGrapher |
getCompositeGrapher()
Returns the
IltCompositeGrapher used by this view. |
Container |
getContainer()
Returns the concrete container where the graphics are currently being
displayed.
|
ilog.cpl.graph.internal.IlpContainerGraphic |
getContainerGraphic(IlpRepresentationObject object)
Returns the
IlpContainerGraphic object that was created by
rendering a given container (ie non-leaf) representation object. |
IlpContext |
getContext()
Returns the application context.
|
IlpGraphicController |
getController()
Returns the controller, that is responsible for
the interaction between the user and the view.
|
Action |
getDefaultGestureAction(IlpGesture gesture)
Returns a default gesture action for a gesture or
null
as appropriate. |
IlpGraphicRenderer |
getDefaultGraphicRenderer()
Deprecated.
Please use CSS
class property instead. |
protected abstract Class |
getDefaultLinkClass()
Retrieves the default class that implements
IlpRepresentationLink . |
protected abstract Class |
getDefaultNodeClass()
Retrieves the default class that implements
IlpRepresentationNode . |
String |
getDefaultViewInteractorName()
Returns the default view interactor name.
|
IlvGrapher |
getGrapher()
Returns the
IlvGrapher used by this view. |
IltCompositeGrapher |
getGrapherForCreateGraphic(IlpRepresentationObject object,
IlpAttribute attribute)
Returns the
IltCompositeGrapher in which the graphic object,
of type IltCompositeGraphic , of a given object should be
created. |
IlpGraphic |
getGraphic(IlpPoint viewLocation)
Returns the
IlpGraphic object at the given position in this
object. |
IlpGraphic |
getGraphic(IlpRepresentationObject object)
Returns the
IlpGraphic object that was created by rendering
a given representation object. |
abstract Class |
getGraphicComponentClass()
Returns the graphic component class supported by this implementation of
graphic view.
|
IlpGraphicHolder |
getGraphicHolder()
Returns the association between representation objects
and graphic objects.
|
ilog.cpl.graphic.internal.IlpGraphicRendererContextFactory |
getGraphicRendererContextFactory()
Accesses the renderer context factory (instance of
IlpGraphicRendererContextFactory ). |
ilog.cpl.graph.css.renderer.IlpGraphLayoutRenderer |
getGraphLayoutRenderer() |
IlvGraphLayout[] |
getGraphLayouts()
Returns the list of graph layouts that have been
configured to this view.
|
IlvGraphLayout[] |
getGraphLayouts(IlpRepresentationObject ro)
Returns the list of graph layouts that have been
configured to the given subnetwork object.
|
IlvGraphLayout |
getGraphLayouts(IlpRepresentationObject ro,
int index)
Returns the graph layout that is configured at the given
index for the given subnetwork object.
|
IlvGraphLayout |
getGraphLayouts(int index)
Returns the graph layout that is configured at the given
index.
|
IlpGraphLayoutSupport |
getGraphLayoutSupport()
Retrieves the layout support object.
|
IlpGraphSelectionModel |
getGraphSelectionModel()
Returns the selection model.
|
JScrollBar |
getHorizontalScrollBar()
Returns the horizontal scrollbar of the view.
|
IlpGraphic |
getInnermostGraphic(IlpPoint viewLocation)
Returns the innermost graphic at the given position in this object.
|
Set<IlpManagerView> |
getInteractibleViews()
Returns a list of all views that may matter for the interactors.
|
ilog.cpl.graph.css.renderer.IlpInteractorRenderer |
getInteractorRenderer() |
IlvLabelLayout |
getLabelLayout()
Returns the label layout used in this view, or
null if
there is no label layout. |
ilog.cpl.graph.css.renderer.IlpLabelLayoutRenderer |
getLabelLayoutRenderer() |
IlvGraphic |
getLayoutProxy(IlpGraphic graphic)
Returns the
IlvGraphic that represents this graphic
object for layout purposes, or null if it is currently
not in a Perforce JViews manager, or not considered by the layout. |
IlvGraphic |
getLayoutProxy(IlpRepresentationObject ro)
Returns the
IlvGraphic that represents this graphic
object for layout purposes, or null if it is currently
not in a Perforce JViews manager, or not considered by the layout. |
IlvGraphLayout |
getLinkLayout()
Returns the graph layout for links.
|
IlvGraphLayout |
getLinkLayout(IlpRepresentationObject ro)
Returns the graph layout for links in the subnetwork of the given
representation object.
|
ilog.cpl.graph.css.renderer.IlpLinkLayoutRenderer |
getLinkLayoutRenderer() |
IlpManagerView |
getManagerView()
Returns the main
IlvManagerView displayed by this view. |
IlpGraphModel |
getModel()
Returns the component's model.
|
IlpMutableStyleSheet |
getMutableStyleSheet()
Returns a mutable style sheet that can be used to change
the view configuration dynamically.
|
IlvGraphLayout |
getNodeLayout()
Returns the graph layout of the view for nodes.
|
IlpNodeRenderer |
getNodeRenderer()
Returns the graphic object meta renderer.
|
IlvJOverview |
getOverview()
Returns the overview window, if currently visible.
|
ilog.cpl.graph.css.renderer.IlpOverviewRenderer |
getOverviewRenderer() |
IlpPosition |
getPosition(IlpRepresentationObject object)
Returns the current position or shape of an object.
|
IlpPositionConverter |
getPositionConverter()
Returns the position converter.
|
ilog.cpl.graph.css.renderer.IlpPositioningRenderer |
getPositioningRenderer() |
IlpPositionSource |
getPositionSource(IlpRepresentationObject object)
Returns the source of current position or shape of an object.
|
List |
getPseudoClasses(IlpRepresentationObject ro,
IlpAttribute a)
Returns the custom pseudoclasses currently active for the object.
|
IlpRepresentationObject |
getRepresentationObject(IlpGraphic g)
Returns the
IlpRepresentationObject that is rendered by the
given IlpGraphic object. |
IlpRepresentationObject |
getRepresentationObject(IlpPoint viewLocation)
Returns the
IlpRepresentationObject at the given position in
this object. |
IlpRepresentationObjectSelectionModel |
getRepresentationObjectSelectionModel()
Returns the
IlpRepresentationObjectSelectionModel
used to handle the selection of representation objects. |
IlvJScrollManagerView |
getScrollView()
Returns the panel containing the manager view and the scrollbars.
|
IlpObject |
getSelectedObject()
Returns the first selected
IlpObject
from the collection of selected objects. |
Collection |
getSelectedObjects()
Returns the set of selected
IlpObject s. |
IlpRepresentationObject |
getSelectedRepresentationObject()
Returns a
IlpRepresentationObject
from the collection of selected representation objects. |
Collection |
getSelectedRepresentationObjects()
Returns the set of selected
IlpRepresentationObject s. |
IlpStyle |
getStyle()
Deprecated.
|
IlpStyle |
getStyle(Class clazz)
Deprecated.
|
IlpStyle |
getStyle(IlpClass clazz)
Deprecated.
|
IlpStyle |
getStyle(IlpObject object)
Deprecated.
|
IlpStyle |
getStyle(IlpRepresentationObject object)
Deprecated.
|
protected IlpStyleListenerSupport |
getStyleListener(IltCompositeGraphic graphic)
Returns a style listener for the given graphic.
|
IlpGraphicViewStyleManager |
getStyleManager()
Deprecated.
|
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.
|
IlvGrapher |
getSubNetwork(IlpRepresentationObject object)
Returns the
IlvGrapher that corresponds to a subnetwork. |
IltCompositeGrapher |
getSubNetworkCompositeGrapher(IlpRepresentationObject object)
Returns the
IltCompositeGrapher that corresponds to a
subnetwork. |
protected IlSynchronizationContext |
getSynchronizationContext()
Returns the context information used to support multiple threads.
|
JToolBar |
getToolBar()
Returns the view toolbar.
|
String |
getToolBarButtonClassFromActionType(String actionType)
Returns the button class name that corresponds to the given action type
This is used when configuring buttons for the component toolbar
|
ilog.cpl.graph.css.renderer.IlpToolBarRenderer |
getToolBarRenderer() |
JScrollBar |
getVerticalScrollBar()
Returns the vertical scrollbar of the view.
|
ilog.cpl.graphic.css.internal.IlpViewCSSContext |
getViewCSSContext()
Returns the context information needed to provide support to
cascading style sheets.
|
protected abstract Logger |
getViewLogger()
Accesses the proper logger for handling log messages.
|
ilog.cpl.graph.css.renderer.IlpViewRenderer |
getViewRenderer() |
IlpGraphView.VisibleModelConnector |
getVisibleModelConnector() |
Collection |
getVisibleObjects()
Returns an unmodifiable collection of the visible objects contained
in the view.
|
ilog.cpl.graph.css.renderer.IlpZoomingRenderer |
getZoomingRenderer() |
IlpZoomPolicy |
getZoomPolicy()
Returns the zoom policy currently in use.
|
boolean |
hasStyleSheets()
Returns
true if style sheets have been defined for this view. |
protected abstract void |
initRenderers()
Renderer initialization.
|
void |
invalidate(IlpRepresentationObject ro)
Invalidates the graphic representation of the given object.
|
void |
invalidateGraphics()
Invalidates all the graphic representations in this view.
|
boolean |
isExpanded(IlpRepresentationObject object)
Determines whether the object is currently expanded or collapsed.
|
boolean |
isHorizontalScrollBarVisible()
Returns
true if the horizontal scrollbar is visible. |
boolean |
isLink(IlpRepresentationObject ro)
Returns if the given object is a link in the visible model.
|
boolean |
isModelChanging()
Returns
true if the model is changing. |
boolean |
isObjectSelected(IlpObject object)
|
boolean |
isOverviewVisible()
Returns
true if the overview is currently visible. |
boolean |
isRepresentationObjectSelected(IlpRepresentationObject object)
|
boolean |
isToolBarExternal()
Tests whether the toolbar is external to the graph view.
|
boolean |
isToolBarVisible()
Tests whether the toolbar is visible.
|
boolean |
isVerticalScrollBarVisible()
Returns true if the vertical scrollbar is visible.
|
boolean |
isVisible(IlvManagerLayer layer)
Returns the global visibility of a layer.
|
boolean |
isVisible(IlvManagerLayer layer,
IlvManagerView view)
Returns the visibility of a layer in a view.
|
boolean |
isVisible(URL backgroundURL)
Returns the visibility of a particular background.
|
void |
optimizeLayout()
Applies the registered node and/or a link layout algorithm to the manager
content.
|
void |
performAttachedLayout(int index)
Applies a given graph layout algorithm once to the manager content.
|
void |
performLabelLayout()
Perform the label layout in this view.
|
void |
performLayoutOnce(IlvGraphLayout layout)
Applies a given graph layout algorithm once to the manager content.
|
void |
performLayoutOnce(IlvGraphLayout layout,
Runnable initializations)
Applies a given graph layout algorithm once to the manager content.
|
void |
performLayoutOnce(IlvGraphLayout layout,
Runnable initializations,
Runnable postprocessing)
Applies a given graph layout algorithm once to the manager content.
|
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 |
removeGraphRendererListener(GraphRendererListener listener)
Removes a listener of graph renderer change events.
|
void |
removeNodeExpansionListener(NodeExpansionListener listener)
Removes the specified listener so that it no longer receives events
from the view when a subnetwork is collapsed or expanded.
|
void |
removePseudoClass(IlpObject bo,
String pseudo)
Removes a pseudoclass from the specified business object.
|
void |
removePseudoClass(IlpRepresentationObject ro,
String pseudo)
Removes a pseudoclass from the specified representation object.
|
void |
removeSelectionObject(IlpObject object)
Removes the given
IlpObject from the selection. |
void |
removeSelectionRepresentationObject(IlpRepresentationObject object)
Removes the given
IlpRepresentationObject from the
selection. |
void |
selectAll()
Puts all visible objects into the selection.
|
void |
setAutoLayoutIndex(IlpRepresentationObject ro,
int index)
Sets the index of the graph layout that should be
executed automatically in the subnetwork objects when the
view contents change.
|
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.
|
protected void |
setBackgroundsRenderer(ilog.cpl.graph.css.renderer.IlpBackgroundsRenderer backgroundsRenderer) |
void |
setBackgroundSupport(IlpBackgroundSupport backgroundSupport)
Replaces the background support object.
|
void |
setBackgroundURLs(URL[] backgroundURLs)
Deprecated.
Use instead
setBackgrounds(List) |
void |
setController(IlpGraphicController controller)
Sets the controller, that is responsible for the interaction between
the user and the view.
|
void |
setDefaultGraphicRenderer(IlpGraphicRenderer renderer)
Deprecated.
Please use CSS
class property instead. |
void |
setDefaultViewInteractorName(String name)
Sets the default view interactor and view interactor by name.
|
void |
setGraphicRendererContextFactory(ilog.cpl.graphic.internal.IlpGraphicRendererContextFactory factory)
Sets a new renderer context factory to be used to create new renderer
contexts (instances of
IlpGraphicRendererContext ). |
protected void |
setGraphLayoutRenderer(ilog.cpl.graph.css.renderer.IlpGraphLayoutRenderer graphLayoutRenderer) |
void |
setGraphLayouts(IlpRepresentationObject ro,
IlvGraphLayout[] layouts)
Changes the layouts that can be applied to the subnetwork that
represents the given representation object.
|
void |
setGraphLayouts(IlpRepresentationObject ro,
int index,
IlvGraphLayout layout)
Sets a new graph layout to this view.
|
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 |
setGraphLayoutSupport(IlpGraphLayoutSupport layoutSupport)
Replaces the layout support object.
|
void |
setGraphSelectionModel(IlpGraphSelectionModel selModel)
Sets the selection model.
|
void |
setHorizontalScrollBarVisible(boolean set)
Shows or hides the horizontal scrollbar.
|
protected void |
setInteractorRenderer(ilog.cpl.graph.css.renderer.IlpInteractorRenderer interactorRenderer) |
void |
setLabelLayout(IlvLabelLayout layout)
Sets the label layout in this view.
|
protected void |
setLabelLayoutRenderer(ilog.cpl.graph.css.renderer.IlpLabelLayoutRenderer labelLayoutRenderer) |
void |
setLinkLayout(IlpRepresentationObject ro,
IlvGraphLayout layout)
Changes the link layout of subnetwork for the given representation
object.
|
void |
setLinkLayout(IlvGraphLayout layout)
Changes the link layout of this view.
|
void |
setLinkLayout(IlvGraphLayout layout,
boolean relayout)
Changes the link layout of this view.
|
protected void |
setLinkLayoutRenderer(ilog.cpl.graph.css.renderer.IlpLinkLayoutRenderer linkLayoutRenderer) |
void |
setModel(IlpGraphModel model)
Sets the component's model.
|
void |
setNodeLayout(IlvGraphLayout layout)
Changes the node layout of this view.
|
void |
setNodeLayout(IlvGraphLayout layout,
boolean relayout)
Changes the node layout of this view.
|
void |
setNodeRenderer(IlpNodeRenderer renderer)
Changes the graphic object meta renderer.
|
protected void |
setOverviewRenderer(ilog.cpl.graph.css.renderer.IlpOverviewRenderer overviewRenderer) |
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.
|
protected void |
setPositioningRenderer(ilog.cpl.graph.css.renderer.IlpPositioningRenderer positioningRenderer) |
void |
setSelectedObject(IlpObject object)
Sets the selected
IlpObject . |
void |
setSelectedObjects(Collection objects)
Sets the set of selected
IlpObject s. |
void |
setSelectedRepresentationObjects(Collection objects)
Sets the set of selected
IlpRepresentationObject s. |
void |
setStyleManager(IlpGraphicViewStyleManager configuration)
Deprecated.
|
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 |
setToolBarExternal(boolean external)
Sets the toolbar to
external (managed by the application)
or integrated (managed by this view). |
protected void |
setToolBarRenderer(ilog.cpl.graph.css.renderer.IlpToolBarRenderer toolbarRenderer) |
void |
setToolBarVisible(boolean visible)
Shows or hides the toolbar.
|
void |
setVerticalScrollBarVisible(boolean set)
Shows or hides the vertical scrollbar.
|
protected void |
setViewRenderer(ilog.cpl.graph.css.renderer.IlpViewRenderer viewRenderer) |
void |
setViewSelected(IlpRepresentationObject object,
boolean selected)
Sets the selected status of a representation object in the
IlvManagerView . |
void |
setVisible(IlvManagerLayer layer,
boolean visible)
Changes the global visibility of a layer.
|
void |
setVisible(IlvManagerLayer layer,
IlvManagerView view,
boolean visible)
Changes the visibility of a layer in a view.
|
void |
setVisible(URL backgroundURL,
boolean visible)
Changes the visibility of a particular background.
|
protected void |
setZoomingRenderer(ilog.cpl.graph.css.renderer.IlpZoomingRenderer zoomingRenderer) |
void |
setZoomPolicy(IlpZoomPolicy zoomPolicy)
Sets the zoom policy.
|
void |
startDelayingUpdates()
Temporarily suspends layout optimization, updates, and redraws.
|
IlpGraphic |
unwrapGraphic(IltCompositeGraphic graphic)
Returns the IlpGraphic wrapped by the IltCompositeGraphic.
|
void |
updateAllGraphics()
Updates all the known graphic representations.
|
void |
updateGraphic(IlpRepresentationObject object)
Updates the graphic representation of an object.
|
IltCompositeGraphic |
wrapGraphic(IlpGraphic graphic)
Wraps a Swing graphic object in an IltCompositeGraphic.
|
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 int SCROLLBAR_UNIT_INCREMENT
Default value: 5
@Deprecated protected IlpGraphicViewStyleManager configuration
protected IlpGraphView(IlpContext context)
The underlying grapher is created through a call to
createGrapher
, and the attached IlvManagerView
is created through a call to createManagerView
.
protected abstract Logger getViewLogger()
protected IlvGrapher createGrapher(IlpContext context)
IlvGrapher
used by this view.
This function is called by the IlpGraphView
constructor.
The default implementation creates an IltNetwork
.
protected IlpManagerView createManagerView(IlvManager grapher, IlpContext context)
IlvManagerView
used by this view.
This function is called by the IlpGraphView
constructor.
The default implementation creates an
IlpManagerView
.
public void addDebugListener(Frame frame)
frame
- The frame the view is contained in.public IlpManagerView getManagerView()
IlvManagerView
displayed by this view.getManagerView
in interface IlpViewsView
public IlvGrapher getGrapher()
IlvGrapher
used by this view.public IltCompositeGrapher getCompositeGrapher()
IltCompositeGrapher
used by this view.public IlvJScrollManagerView getScrollView()
public boolean isHorizontalScrollBarVisible()
true
if the horizontal scrollbar is visible.getScrollView()
,
IlvJScrollManagerView
public void setHorizontalScrollBarVisible(boolean set)
This can be used to temporarily change the visibility of the
scrollbar. In order to control the visibility permanently, use the
scrollbar policy. The policy HORIZONTAL_SCROLLBAR_AS_NEEDED
modifies the horizontal scrollbar visibility when necessary.
set
- If this parameter is true
, the scrollbar is shown.getScrollView()
,
IlvJScrollManagerView
public JScrollBar getHorizontalScrollBar()
getScrollView()
,
IlvJScrollManagerView
public boolean isVerticalScrollBarVisible()
getScrollView()
,
IlvJScrollManagerView
public void setVerticalScrollBarVisible(boolean set)
This can be used to temporarily change the visibility of the
scrollbar. In order to control the visibility permanently, use the
scrollbar policy. The policy VERTICAL_SCROLLBAR_AS_NEEDED
modifies the vertical scrollbar visibility when necessary.
set
- If this parameter is true
the scrollbar is shown.getScrollView()
,
IlvJScrollManagerView
public JScrollBar getVerticalScrollBar()
getScrollView()
,
IlvJScrollManagerView
public boolean isVisible(IlvManagerLayer layer)
layer
- A Perforce JViews layer.public void setVisible(IlvManagerLayer layer, boolean visible)
layer
- A Perforce JViews layer.visible
- The new layer visibility.public boolean isVisible(IlvManagerLayer layer, IlvManagerView view)
layer
- A Perforce JViews layer.view
- A Perforce JViews view, either getManagerView
or getOverview().getOverviewView()
.public void setVisible(IlvManagerLayer layer, IlvManagerView view, boolean visible)
layer
- A Perforce JViews layer.view
- A Perforce JViews view, either getManagerView
or getOverview().getOverviewView()
visible
- The new layer visibility.public IlpBackgroundSupport getBackgroundSupport()
getBackgroundSupport
in interface IlpBackgroundProvider
public void setBackgroundSupport(IlpBackgroundSupport backgroundSupport)
If any problems occur they are logged.
backgroundSupport
- The new background support object.@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.
backgroundURLs
- The new list of backgrounds.
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
@Deprecated public IlvManagerLayer getBackgroundLayer(URL backgroundURL)
List getBackgroundLayers(URL)
This method delegates to the background support object.
backgroundURL
- The background to be found.IlvManagetLayer
instance that is part of the
IlpBackground
instance that corresponds to the given URL
.
If any problems occur it returns null
.
If any problems occur they are logged.
public List getBackgroundLayers(URL backgroundURL) throws IlpBackgroundHandlingException
backgroundURL
- the URL of interestIlpBackgroundHandlingException
public boolean isVisible(URL backgroundURL)
This method delegates to the background support object.
backgroundURL
- The background for which visibility is required.URL
. If any problems occur, false
is returned.
If any problems occur they are logged.
public void setVisible(URL backgroundURL, boolean visible)
This method delegates to the background support object.
backgroundURL
- The background that will have its visibility changed.visible
- The new visibility setting.@Deprecated public void reload(URL backgroundURL)
reloadBackground(URL)
This method delegates to the background support object.
backgroundURL
- The background to be reloaded.
If any problems occur they are logged.
public void reloadBackground(URL backgroundURL) throws IlpBackgroundHandlingException
This method delegates to the background support object.
backgroundURL
- The background to be reloaded.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)
zoomPolicy
- The zoom policy to set.IltMixedZoomPolicy
,
IltLogicalZoomPolicy
,
IltPhysicalZoomPolicy
public void fitToContents()
fitToContents
in interface IlpViewsView
public void fitToContents(Insets insets)
fitToContents
in interface IlpViewsView
insets
- Describes the margins around the contents of the manager.public IlvJOverview getOverview()
public boolean isOverviewVisible()
true
if the overview is currently visible.public void setOverviewVisible(boolean visible)
visible
- The required visibility setting.public JToolBar getToolBar()
public boolean isToolBarVisible()
Note: This function is only relevant if the toolbar is integrated in the view and not managed externally.
setToolBarVisible(boolean)
,
isToolBarExternal()
public void setToolBarVisible(boolean visible)
Note: This function has an effect only if the toolbar is integrated in the view and not managed externally.
visible
- The required visibility setting.isToolBarVisible()
,
isToolBarExternal()
public boolean isToolBarExternal()
external
, it is up to the
application to control the toolbar placement and visibility. For example,
the application can place the toolbar into a (modal or non-modal)
JDialog
, or elsewhere in the application frame.setToolBarExternal(boolean)
public void setToolBarExternal(boolean external)
external
(managed by the application)
or integrated
(managed by this view).isToolBarExternal()
public String getToolBarButtonClassFromActionType(String actionType)
actionType
- public Object createToolBarButtonFromAction(Action a)
a
- Actionprotected void activateDefaultViewInteractorName()
public void setDefaultViewInteractorName(String name)
name
- The name of an interactor button present in the toolbar.public String getDefaultViewInteractorName()
public Set<IlpManagerView> getInteractibleViews()
Collection
of IlpManagerView
.public void setGraphLayoutSupport(IlpGraphLayoutSupport layoutSupport)
layoutSupport
- The new layout support object.public IlpGraphLayoutSupport getGraphLayoutSupport()
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 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 optimizeLayout()
.
layouts
- Graph layoutsgetGraphLayouts()
,
setAutoLayoutIndex(int)
,
performAttachedLayout(int)
public IlvGraphLayout[] getGraphLayouts()
setGraphLayouts(IlvGraphLayout[])
public void setGraphLayouts(int index, IlvGraphLayout layout)
index
- Layout indexlayout
- Layoutpublic IlvGraphLayout getGraphLayouts(int index)
index
- Layout indexnull
if none is defined.public void setAutoLayoutIndex(int index)
Changing the automatic layout index does not trigger
a relayout automatically. The layout will be performed
by request (See optimizeLayout()
or when the contents of the view is changed.
Default value is 0.
index
- Layout indexpublic int getAutoLayoutIndex()
-1
if none
shall be executed automatically.public void setGraphLayouts(IlpRepresentationObject ro, 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(IlpRepresentationObject, int)
.
The other layouts can be executed on demand using
method 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 optimizeLayout()
.
ro
- Subnetwork representation objectlayouts
- Graph layoutsgetGraphLayouts(IlpRepresentationObject)
,
setAutoLayoutIndex(IlpRepresentationObject, int)
,
performAttachedLayout(int)
public IlvGraphLayout[] getGraphLayouts(IlpRepresentationObject ro)
ro
- Subnetwork representation objectsetGraphLayouts(IlpRepresentationObject, IlvGraphLayout[])
public void setGraphLayouts(IlpRepresentationObject ro, int index, IlvGraphLayout layout)
ro
- Subnetwork representation objectindex
- Layout indexlayout
- Layoutpublic IlvGraphLayout getGraphLayouts(IlpRepresentationObject ro, int index)
ro
- Subnetwork representation objectindex
- Layout indexnull
if none is defined.public void setAutoLayoutIndex(IlpRepresentationObject ro, int index)
Default value is 0.
ro
- Representation objectindex
- Layout indexpublic int getAutoLayoutIndex(IlpRepresentationObject ro)
Default value is 0.
ro
- Subnetwork representation objectpublic void setLinkLayout(IlpRepresentationObject ro, IlvGraphLayout layout)
Since this layout is applied to a subnetwork, using this method does not trigger the automatic layout execution. This will be done in the view when some of its contents is changed.
ro
- The container representation object.layout
- A graph layout or null
.public IlvGraphLayout getLinkLayout(IlpRepresentationObject ro)
null
if none has been specified.public void performAttachedLayout(int index)
setGraphLayouts(int, IlvGraphLayout)
).
In contrast to the node and link layout optimizers that are registered in the grapher and called automatically when needed, this function allows you to call a layout only once. It is useful when the layout takes a lot of time.
index
- Layout indexsetGraphLayouts(IlvGraphLayout[])
,
setGraphLayouts(int, IlvGraphLayout)
public IlvGraphLayout getNodeLayout()
null
if none has been specified.public void setNodeLayout(IlvGraphLayout layout)
layout
- A graph layout or null
.setGraphLayouts(IlvGraphLayout[])
,
setGraphLayouts(int, IlvGraphLayout)
public void setNodeLayout(IlvGraphLayout layout, boolean relayout)
Use this function with relayout
set to false
if you need to set some layout parameters after the layout has been
attached. This is needed for setting the layout region and for passing
any layout proxies to the graph layout (for example, using
IlvBusLayout.setBus
, IlvTreeLayout.setRoot
,
IlvCircularLayout.setClusterId
).
This method corresponds to:
setGraphLayouts(new IlvGraphLayout[] { layout }); setAutoLayoutIndex(0); if (relayout) optimizeLayout();
layout
- A graph layout or null
.relayout
- Specifies whether the layout optimizers should be called
immediately.setGraphLayouts(IlvGraphLayout[])
,
setGraphLayouts(int, IlvGraphLayout)
public IlvGraphLayout getLinkLayout()
null
if none has been specified.public void setLinkLayout(IlvGraphLayout layout)
If layout
is null
, and the node layout does
not update links, a default link layout is substituted. It can be
obtained using getLinkLayout()
.
layout
- A graph layout or null
.public void setLinkLayout(IlvGraphLayout layout, boolean relayout)
If layout
is null
, and the node layout does
not update links, a default link layout is substituted. It can be
obtained using getLinkLayout()
.
layout
- A graph layout or null
.relayout
- Specifies whether the layout optimizers should be called
immediately.public void optimizeLayout()
Since the registered node and/or link layout is invoked automatically, this function needs to be used:
setGraphLayouts(IlvGraphLayout[])
, setGraphLayouts(int, IlvGraphLayout)
or setAutoLayoutIndex(int)
;setNodeLayout
or setLinkLayout
if it has been invoked with
relayout
=false
;public void performLayoutOnce(IlvGraphLayout layout)
In contrast to the node and link layout optimizers that are registered in the grapher and called automatically when needed, this function allows you to call a layout only once. It is useful when the layout takes a lot of time.
layout
- A graph layout that is not attached to any grapher
or graph model.public void performLayoutOnce(IlvGraphLayout layout, Runnable initializations)
In contrast to the node and link layout optimizers, which are registered in the grapher and called automatically when needed, this function allows you to call a layout only once. It is useful when the layout takes a lot of time to perform.
layout
- A graph layout that is not attached to any grapher
or graph model.initializations
- Code that performs initializations of the layout,
after the layout is attached, but before it is run.public void performLayoutOnce(IlvGraphLayout layout, Runnable initializations, Runnable postprocessing)
In contrast to the node and link layout optimizers, that are registered in the grapher and called automatically when needed, this function allows you to call a layout only once. It is useful when the layout takes a lot of time to perform.
layout
- A graph layout that is not attached to any grapher
or graph model.initializations
- Code that performs initializations of the layout
after the layout is attached, but before it is run.postprocessing
- Code that performs post-processing of the layout
after the layout has been run, but before it is
detached.public IlvGraphic getLayoutProxy(IlpGraphic graphic)
IlvGraphic
that represents this graphic
object for layout purposes, or null
if it is currently
not in a Perforce JViews manager, or not considered by the layout.
This method returns a proxy with the right geometric properties, but
no graphic properties at all.public IlvGraphic getLayoutProxy(IlpRepresentationObject ro)
IlvGraphic
that represents this graphic
object for layout purposes, or null
if it is currently
not in a Perforce JViews manager, or not considered by the layout.
This method returns a proxy with the right geometric properties, but
no graphic properties at all.ro
- Representation objectIlvGraphic
that represents this object
for layout purposes, or null
if it is currently
not being represented or not considered by the layout.public IlvLabelLayout getLabelLayout()
null
if
there is no label layout.IlvLabelLayout
.public void setLabelLayout(IlvLabelLayout layout)
layout
- An IlvLabelLayout
.public void performLabelLayout()
public void startDelayingUpdates()
public void endDelayingUpdates()
startDelayingUpdates()
.
Also calls the layout optimizer if it was requested while suspended,
and performs updates and redraws if necessary.public IlpGraphicHolder getGraphicHolder()
In the network component and equipment component, there are no graphic objects associated with individual attributes, but only with representation objects as a whole.
getGraphicHolder
in interface IlpGraphicView
public IlpGraphic getGraphic(IlpRepresentationObject object)
IlpGraphic
object that was created by rendering
a given representation object.public IlpRepresentationObject getRepresentationObject(IlpGraphic g)
IlpRepresentationObject
that is rendered by the
given IlpGraphic
object.public ilog.cpl.graph.internal.IlpContainerGraphic getContainerGraphic(IlpRepresentationObject object)
IlpContainerGraphic
object that was created by
rendering a given container (ie non-leaf) representation object.public IlvGrapher getSubNetwork(IlpRepresentationObject object)
IlvGrapher
that corresponds to a subnetwork.public IltCompositeGrapher getSubNetworkCompositeGrapher(IlpRepresentationObject object)
IltCompositeGrapher
that corresponds to a
subnetwork.public IlpContext getContext()
getContext
in interface IlpGraphicView
public IlpGraphicController getController()
getController
in interface IlpGraphicView
IlpGraphController
.public void setController(IlpGraphicController controller)
setController
in interface IlpGraphicView
controller
- The controller to set. It must be an instance of
IlpGraphController
without a view.@Deprecated public IlpGraphicViewStyleManager getStyleManager()
getStyleManager
in interface IlpGraphicView
@Deprecated public void setStyleManager(IlpGraphicViewStyleManager configuration)
setStyleManager
in interface IlpGraphicView
@Deprecated public IlpStyle getStyle()
Equivalent to getStyleManager().getStyle()
.
@Deprecated public IlpStyle getStyle(IlpRepresentationObject object)
Equivalent to getStyleManager().getStyle(object)
.
@Deprecated public IlpStyle getStyle(IlpObject object)
Equivalent to getStyleManager().getStyle(object)
.
@Deprecated public IlpStyle getStyle(IlpClass clazz)
Equivalent to getStyleManager().getStyle(clazz)
.
@Deprecated public IlpStyle getStyle(Class clazz)
Equivalent to getStyleManager().getStyle(clazz)
.
public IlpPosition getPosition(IlpRepresentationObject object)
public IlpPositionSource getPositionSource(IlpRepresentationObject object)
public void setPosition(IlpRepresentationObject object, IlpPosition position, IlpPositionSource source)
Sets the current position or shape of an object.
This method is intended to update the position of representation
objects when there is no data source connected to the component.
When a data source is connected, the position
attribute
of business objects (IlpObject
) should be used instead.
Using this method will explicitly set a position for the given
representation object in this view. Any changes to the
position
attribute of the corresponding business object
(IlpObject
) will be ignored. Passing null
to
the position
paremeter will remove the explicit position
and the view will use the position
attribute again.
object
- The representation object.position
- The new position.source
- The reason why the position is being changed.public IlpPositionConverter getPositionConverter()
public void setPositionConverter(IlpPositionConverter positionConverter)
public IlpAttribute getAttribute(IlpPoint viewLocation)
IlpAttribute
object at the given position
in this object.getAttribute
in interface IlpGraphicView
viewLocation
- The position to be checked.null
if there is no attribute represented at this position.public IlpRepresentationObject getRepresentationObject(IlpPoint viewLocation)
IlpRepresentationObject
at the given position in
this object.getRepresentationObject
in interface IlpGraphicView
public IlpGraphic getGraphic(IlpPoint viewLocation)
IlpGraphic
object at the given position in this
object.getGraphic
in interface IlpGraphicView
public IlpGraphic getInnermostGraphic(IlpPoint viewLocation)
The innermost graphic is any of the graphics that compose the graphic object, such as the decoration icons.
getInnermostGraphic
in interface IlpGraphicView
public abstract Class getGraphicComponentClass()
getGraphicComponentClass
in interface IlpGraphicView
public void invalidate(IlpRepresentationObject ro)
Recomputes the object graphic representation.
invalidate
in interface IlpGraphicView
public void invalidateGraphics()
invalidateGraphics
in interface IlpGraphicView
public void updateAllGraphics()
public Container getContainer()
getContainer
in interface IlpGraphicView
public IltCompositeGrapher getGrapherForCreateGraphic(IlpRepresentationObject object, IlpAttribute attribute)
IltCompositeGrapher
in which the graphic object,
of type IltCompositeGraphic
, of a given object should be
created.object
- The object to be displayed.attribute
- Ignored@Deprecated public IlpGraphicRenderer getDefaultGraphicRenderer()
class
property instead.@Deprecated public void setDefaultGraphicRenderer(IlpGraphicRenderer renderer)
class
property instead.This renderer is used for objects that do not have an
IlpObject.GraphicRenderer
style value.
The installed renderer createGraphic
implementation can
safely ignore its IlpAttribute
argument. Both network and
equipment components will always pass null
in place of an
IlpAttribute
.
IlpDefaultNodeRenderer
public IlpNodeRenderer getNodeRenderer()
public void setNodeRenderer(IlpNodeRenderer renderer)
The meta renderer usually delegates rendering to the renderer defined
by the graphicRenderer
CSS property. This method can be used
in order to implement additional graphic features on all objects in the
view.
public IltCompositeGraphic wrapGraphic(IlpGraphic graphic)
public IlpGraphic unwrapGraphic(IltCompositeGraphic graphic)
protected IlSynchronizationContext getSynchronizationContext()
protected IlpStyleListenerSupport getStyleListener(IltCompositeGraphic graphic)
graphic
- Graphic objectpublic void addPendingContainerCollapse(IlpRepresentationObject object)
object
- public void setGraphicRendererContextFactory(ilog.cpl.graphic.internal.IlpGraphicRendererContextFactory factory)
IlpGraphicRendererContext
).factory
- The new factory to be set.public ilog.cpl.graphic.internal.IlpGraphicRendererContextFactory getGraphicRendererContextFactory()
IlpGraphicRendererContextFactory
).public void updateGraphic(IlpRepresentationObject object)
object
- Representation object to be updatedpublic void doUpdateGraphic(IlpRepresentationObject object, IlpGraphic g)
public void addVisibleChildren(IlpRepresentationObject object)
This method loads all the children objects, through the call to
IlpGraphVisibleModel.getChildren()
and add the
child objects to the visible model too.
public final IlpGraphView.VisibleModelConnector getVisibleModelConnector()
public final IlpGraphModel getModel()
public final void setModel(IlpGraphModel model)
protected abstract ilog.cpl.graph.internal.IlpGraphVisibleModel createVisibleModel()
null
otherwise.public boolean isModelChanging()
true
if the model is changing.public boolean isLink(IlpRepresentationObject ro)
IlpSubNetworkContainerGraphic.addChild(ilog.cpl.graphic.IlpGraphic)
public boolean isExpanded(IlpRepresentationObject object)
For those subnetwork objects where collapsed objects are not allowed,
this method always returns true
.
public boolean defaultIsExpanded(IlpRepresentationObject object)
object
- Representation objecttrue
if by default this object should be expanded.public void expandObject(IlpRepresentationObject object)
public void defaultExpandObject(IlpRepresentationObject object)
object
- public void collapseObject(IlpRepresentationObject object)
public void defaultCollapseObject(IlpRepresentationObject object)
object
- public void addNodeExpansionListener(NodeExpansionListener listener)
listener
- Node expansion listener.NodeExpansionListener
public void removeNodeExpansionListener(NodeExpansionListener listener)
listener
- Node expansion listener.NodeExpansionListener
public void setViewSelected(IlpRepresentationObject object, boolean selected)
IlvManagerView
.public IlpGraphSelectionModel getGraphSelectionModel()
protected abstract IlpGraphSelectionModel createGraphSelectionModel()
public void setGraphSelectionModel(IlpGraphSelectionModel selModel)
Note: It is the caller's responsibility to install an
IlpRepresentationMapper
on the model.
getGraphSelectionModel()
public IlpRepresentationObjectSelectionModel getRepresentationObjectSelectionModel()
IlpRepresentationObjectSelectionModel
used to handle the selection of representation objects.getRepresentationObjectSelectionModel
in interface IlpGraphicView
public IlpRepresentationObject getSelectedRepresentationObject()
IlpRepresentationObject
from the collection of selected representation objects.
Returns null
if there is no selected object.public Collection getSelectedRepresentationObjects()
IlpRepresentationObject
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.IlpRepresentationObject
s.public void setSelectedRepresentationObjects(Collection objects)
IlpRepresentationObject
s.
This has no effect if the given object is null
or if
it is already selected.objects
- The collection of representation objects that will
become the selection.public boolean isRepresentationObjectSelected(IlpRepresentationObject object)
object
- The representation object that may be selected.public void addSelectionRepresentationObject(IlpRepresentationObject object)
IlpRepresentationObject
to the
selection.
This has no effect if the given object is null
.object
- The representation object that will be added to the
selection.public void removeSelectionRepresentationObject(IlpRepresentationObject object)
IlpRepresentationObject
from the
selection.
This has no effect if the given object is null
.object
- The representation object that will be removed from the
selection.public IlpObject getSelectedObject()
IlpObject
from the collection of selected objects.
Returns null
if there is no selected object.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.IlpObject
s.public void setSelectedObject(IlpObject object)
IlpObject
.
This has no effect if the given object is already selected.object
- The object that will become the selection.public void setSelectedObjects(Collection objects)
IlpObject
s.objects
- The collection of objects that will become the selection.public boolean isObjectSelected(IlpObject object)
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
.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
.object
- The object that will be removed from the selection.public void clearSelection()
public void selectAll()
public Action getDefaultGestureAction(IlpGesture gesture)
null
as appropriate.getDefaultGestureAction
in interface IlpViewsView
protected abstract Class getDefaultNodeClass()
IlpRepresentationNode
.Class
that implements
IlpRepresentationNode
.protected abstract Class getDefaultLinkClass()
IlpRepresentationLink
.Class
that implements
IlpRepresentationLink
.public Collection getVisibleObjects()
IlpRepresentationObject
s.public IlvRect getBoundingBox(IlpRepresentationObject object)
The bounding box includes the base rectangle plus all decorations, based on the current view transformer.
Note: If this bounding box has to be rounded (to be drawn using
Graphics
, for example), use Math.ceil()
instead of Math.floor()
.
object
- The representation object to compute the bounding boxnull
if object is not currently
visible.public IlvRect getBaseRectangle(IlpRepresentationObject object)
Returns the base rectangle of the given representation object in manager view coordinates.
The base rectangle is based on the current view transformer and does not include any decorations the object might have.
Note: If this bounding box has to be rounded (to be drawn using
Graphics
, for example), use Math.ceil()
instead of Math.floor()
.
object
- The representation object to compute the base rectanglenull
if object is not currently
visible.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
otherwise.public boolean ensureVisible(Collection objects)
objects
- A collection of representation objects.false
if none of the given objects is visible;
true
otherwise.public boolean ensureVisible(IlpRepresentationObject object)
true
if the object is visible, false
otherwise.public boolean ensureVisible(IlpObject object)
true
if the object is visible, false
otherwise.public void ensureVisible()
public void dispose()
Note: After calling this function, this view is no longer functional.
public ilog.cpl.graph.css.renderer.IlpToolBarRenderer getToolBarRenderer()
protected void setToolBarRenderer(ilog.cpl.graph.css.renderer.IlpToolBarRenderer toolbarRenderer)
initRenderers()
public ilog.cpl.graph.css.renderer.IlpViewRenderer getViewRenderer()
protected void setViewRenderer(ilog.cpl.graph.css.renderer.IlpViewRenderer viewRenderer)
initRenderers()
public ilog.cpl.graph.css.renderer.IlpOverviewRenderer getOverviewRenderer()
protected void setOverviewRenderer(ilog.cpl.graph.css.renderer.IlpOverviewRenderer overviewRenderer)
initRenderers()
public ilog.cpl.graph.css.renderer.IlpInteractorRenderer getInteractorRenderer()
protected void setInteractorRenderer(ilog.cpl.graph.css.renderer.IlpInteractorRenderer interactorRenderer)
initRenderers()
public ilog.cpl.graph.css.renderer.IlpZoomingRenderer getZoomingRenderer()
protected void setZoomingRenderer(ilog.cpl.graph.css.renderer.IlpZoomingRenderer zoomingRenderer)
initRenderers()
public ilog.cpl.graph.css.renderer.IlpGraphLayoutRenderer getGraphLayoutRenderer()
protected void setGraphLayoutRenderer(ilog.cpl.graph.css.renderer.IlpGraphLayoutRenderer graphLayoutRenderer)
initRenderers()
public ilog.cpl.graph.css.renderer.IlpLinkLayoutRenderer getLinkLayoutRenderer()
protected void setLinkLayoutRenderer(ilog.cpl.graph.css.renderer.IlpLinkLayoutRenderer linkLayoutRenderer)
initRenderers()
public void enableLinkLayoutRendererConfiguration()
public ilog.cpl.graph.css.renderer.IlpLabelLayoutRenderer getLabelLayoutRenderer()
protected void setLabelLayoutRenderer(ilog.cpl.graph.css.renderer.IlpLabelLayoutRenderer labelLayoutRenderer)
initRenderers()
public ilog.cpl.graph.css.renderer.IlpBackgroundsRenderer getBackgroundsRenderer()
protected void setBackgroundsRenderer(ilog.cpl.graph.css.renderer.IlpBackgroundsRenderer backgroundsRenderer)
initRenderers()
public ilog.cpl.graph.css.renderer.IlpPositioningRenderer getPositioningRenderer()
protected void setPositioningRenderer(ilog.cpl.graph.css.renderer.IlpPositioningRenderer positioningRenderer)
initRenderers()
protected abstract void initRenderers()
public void addGraphRendererListener(GraphRendererListener listener)
public void removeGraphRendererListener(GraphRendererListener listener)
listener
- Graph renderer listenerpublic ilog.cpl.graphic.css.internal.IlpViewCSSContext getViewCSSContext()
getViewCSSContext
in interface ilog.cpl.graphic.css.internal.IlpCSSGraphicView
protected abstract ilog.cpl.graph.css.internal.IlpGraphViewCSSContext createViewCSSContext()
public void setStyleSheets(String[] css) throws IlvStylingException
setStyleSheets
in interface IlvStylable
css
- An array of strings containing the URLs or the file names
of CSS files (usually with a .css
suffix).IlvStylingException
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
or the file names of CSS files (usually with a
.css
suffix) or CSS extracts directly.updateMask
- Flag that indicates whether the view and/or the business
objects must be updated to use this new configuration.
When
IlpStylable.UPDATE_COMPONENT_MASK
is set, the view is 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 or file name of the new style sheet file.IlvStylingException
setStyleSheets(java.lang.String[])
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 and to all the
representation objects that are already displayed in it.
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 view and/or the
business objects must be updated to use this new
configuration. When
IlpStylable.UPDATE_COMPONENT_MASK
is set, the view is 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(int index)
getStyleSheets
in interface IlvStylable
index
- The position of the cascading style sheet to return.index
-th position.setStyleSheets(int, String)
,
setStyleSheets(String[])
public String[] getStyleSheets()
getStyleSheets
in interface IlvStylable
setStyleSheets(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.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 boolean hasStyleSheets()
true
if style sheets have been defined for this view.hasStyleSheets
in interface ilog.cpl.graphic.css.internal.IlpCSSGraphicView
public IlpMutableStyleSheet getMutableStyleSheet()
This mutable style sheet is also used by different interactors to store their changes.
The mutable style sheet is created and registered in this view when this method is called for the first time.
Note that if you replace the existing style sheets, the mutable style sheet will no longer be connected to this view. Once this happens, a future call to this method will then create a new mutable style sheet, registering it in the component.
getMutableStyleSheet
in interface IlpStylableViewsView
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.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 associated with the data object.public void addPseudoClass(IlpRepresentationObject ro, String pseudo)
If the given representation object is associated to a business
model, then this method is similar to calling
addPseudoClass(IlpObject,String)
.
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.
ro
- The representation object.pseudo
- A string that identifies a pseudoclass to add to the
classes already associated with the data object.addPseudoClass(IlpObject,String)
public void removePseudoClass(IlpRepresentationObject ro, String pseudo)
If the given representation object is associated to a business
model then this method is similar to calling
removePseudoClass(IlpObject,String)
.
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.
ro
- The representation object.pseudo
- A string that identifies a pseudoclass to remove from
the classes associated with the data object.removePseudoClass(IlpObject,String)
public List getPseudoClasses(IlpRepresentationObject ro, IlpAttribute a)
getPseudoClasses
in interface ilog.cpl.graphic.css.internal.IlpCSSGraphicView
addPseudoClass(IlpRepresentationObject, String)
,
removePseudoClass(IlpRepresentationObject, String)
© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.