public class IlpViewRenderer
extends ilog.cpl.graph.css.renderer.IlpViewRenderer
IlpNetworkView
.
This class shows all the properties that can be customized in the network view using cascading style sheets.
The CSS configuration can be applied to the network component, using
IlpGraphView.setStyleSheets(java.lang.String[])
.
To customize the network view programmatically, use
IlpNetworkView
.
This class is a CSS JavaBean that can be customized. It can be configured as follows in a CSS file:
View { horizontalScrollBarPolicy: Never; verticalScrollBarPolicy: Never; keepingAspectRatio: true; }
The value in CSS, denotes the policy that is used to specify the presence or
absence of the specified scrollbar. The value Always
means that the
scrollbar is visible; Never
means that it is not visible and
AsNeeded
means that it will be displayed or not according to the
contents of the view.
The property keepingAspectRatio
configures if the aspect ratio
of the main window is kept when a zoom transformer are applied.
The properties minZoomXFactor
, minZoomYFactor
,
maxZoomXFactor
and maxZoomYFactor
configure the
minimal and maximal zoom factors that will be accepted by the main window.
The properties wheelZoomingEnabled
and wheelScrollingEnabled
configure whether the graph view will respond to mouse wheel events.
IlpNetworkView
Constructor and Description |
---|
IlpViewRenderer() |
Modifier and Type | Method and Description |
---|---|
int |
getHorizontalScrollBarPolicy()
Returns the horizontal scrollbar policy value.
|
double |
getMaxZoomXFactor()
Returns the maximal zoom factor allowed for the view in the x direction.
|
double |
getMaxZoomYFactor()
Returns the maximal zoom factor allowed for the view in the y direction.
|
double |
getMinZoomXFactor()
Returns the minimal zoom factor allowed for the view in the x direction.
|
double |
getMinZoomYFactor()
Returns the minimal zoom factor allowed for the view in the y direction.
|
int |
getVerticalScrollBarPolicy()
Returns the vertical scrollbar policy value.
|
boolean |
isHorizontalScrollBarVisible()
Returns
true if the horizontal scrollbar is visible. |
boolean |
isKeepingAspectRatio()
Returns
true if the aspect ratio in the main window is kept
when a zoom transformer is applied. |
boolean |
isVerticalScrollBarVisible()
Returns
true if the vertical scrollbar is visible. |
boolean |
isWheelScrollingEnabled()
Indicates whether or not scrolling will take place in response to movement
of the mouse wheel.
|
boolean |
isWheelZoomingEnabled()
Indicates whether or not zooming will take place in response to movement
of the mouse wheel plus control key pressed.
|
void |
setHorizontalScrollBarPolicy(int policy)
Sets the policy when the horizontal scrollbar appears.
|
void |
setHorizontalScrollBarVisible(boolean set)
Shows or hides the horizontal scrollbar.
|
void |
setKeepingAspectRatio(boolean set)
Sets the parameter that controls whether the main view will keep its aspect
ratio when zooming.
|
void |
setMaxZoomXFactor(double factor)
Sets the maximal zoom factor allowed for the view in the x direction.
|
void |
setMaxZoomYFactor(double factor)
Sets the maximal zoom factor allowed for the view in the y direction.
|
void |
setMinZoomXFactor(double factor)
Sets the minimal zoom factor allowed for the view in the x direction.
|
void |
setMinZoomYFactor(double factor)
Sets the minimal zoom factor allowed for the view in the y direction.
|
void |
setVerticalScrollBarPolicy(int policy)
Sets the policy when the vertical scrollbar appears.
|
void |
setVerticalScrollBarVisible(boolean set)
Shows or hides the vertical scrollbar.
|
void |
setWheelScrollingEnabled(boolean set)
Enables/disables scrolling in response to movement of the mouse wheel.
|
void |
setWheelZoomingEnabled(boolean set)
Enables/disables zooming in response to movement of the mouse wheel
plus control key pressed.
|
attach, getView, noteContainerAdded, noteContainerUpdated
public boolean isHorizontalScrollBarVisible()
true
if the horizontal scrollbar is visible.isHorizontalScrollBarVisible
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
public void setHorizontalScrollBarVisible(boolean set)
This property 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 scrollbar when necessary to change its visibility.
setHorizontalScrollBarVisible
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
set
- If this parameter is true
, the scrollbar will
be shown.setHorizontalScrollBarPolicy(int)
public int getHorizontalScrollBarPolicy()
getHorizontalScrollBarPolicy
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setHorizontalScrollBarPolicy(int)
public void setHorizontalScrollBarPolicy(int policy)
setHorizontalScrollBarPolicy
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
policy
- one of the three values listed aboveIllegalArgumentException
- if policy
is not one of the legal values shown abovegetHorizontalScrollBarPolicy()
public boolean isVerticalScrollBarVisible()
true
if the vertical scrollbar is visible.isVerticalScrollBarVisible
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
public void setVerticalScrollBarVisible(boolean set)
This property 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 scrollbar when necessary to change its visibility.
setVerticalScrollBarVisible
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
set
- If this parameter is true
, the scrollbar will
be shown.setVerticalScrollBarPolicy(int)
public int getVerticalScrollBarPolicy()
getVerticalScrollBarPolicy
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setVerticalScrollBarPolicy(int)
public void setVerticalScrollBarPolicy(int policy)
setVerticalScrollBarPolicy
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
policy
- one of the three values listed aboveIllegalArgumentException
- if policy
is not one of the legal values shown abovegetVerticalScrollBarPolicy()
public boolean isKeepingAspectRatio()
true
if the aspect ratio in the main window is kept
when a zoom transformer is applied.isKeepingAspectRatio
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
public void setKeepingAspectRatio(boolean set)
setKeepingAspectRatio
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
set
- true
to keep the aspect ratio.public void setMinZoomXFactor(double factor)
0
and not larger than
the current maximal zoom factor.setMinZoomXFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
factor
- The minimal zoom factor in the x direction.getMinZoomXFactor()
,
setMaxZoomXFactor(double)
public double getMinZoomXFactor()
getMinZoomXFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setMinZoomXFactor(double)
public void setMaxZoomXFactor(double factor)
0
and must not be
smaller than the current minimal zoom factor.setMaxZoomXFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
factor
- The maximal zoom factor in the x direction.getMaxZoomXFactor()
,
setMinZoomXFactor(double)
public double getMaxZoomXFactor()
getMaxZoomXFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setMaxZoomXFactor(double)
public void setMinZoomYFactor(double factor)
0
and must not be
larger than the current maximal zoom factor.setMinZoomYFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
factor
- The minimal zoom factor in the y direction.getMinZoomYFactor()
,
setMaxZoomYFactor(double)
public double getMinZoomYFactor()
getMinZoomYFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setMinZoomYFactor(double)
public void setMaxZoomYFactor(double factor)
0
and must not be
smaller than the current minimal zoom factor.setMaxZoomYFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
factor
- The maximal zoom factor in the y direction.getMaxZoomYFactor()
,
setMinZoomYFactor(double)
public double getMaxZoomYFactor()
getMaxZoomYFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setMaxZoomYFactor(double)
public boolean isWheelScrollingEnabled()
isWheelScrollingEnabled
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setWheelScrollingEnabled(boolean)
public void setWheelScrollingEnabled(boolean set)
setWheelScrollingEnabled
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
set
- true
if scrolling should be done
automatically for a MouseWheelEvent,
false
otherwise.isWheelScrollingEnabled()
public boolean isWheelZoomingEnabled()
isWheelZoomingEnabled
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setWheelZoomingEnabled(boolean)
public void setWheelZoomingEnabled(boolean set)
setWheelZoomingEnabled
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
set
- true
if zooming should be done
automatically for a MouseWheelEvent,
false
otherwise.isWheelZoomingEnabled()
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.