public class IlpViewRenderer
extends ilog.cpl.graph.css.renderer.IlpViewRenderer
IlpEquipmentView
.
This class shows all the properties that can be customized in the equipment view using cascading style sheets.
The CSS configuration can be applied to the equipment component, using
IlpGraphView.setStyleSheets(java.lang.String[])
.
To programmatically customize the equipment view, use
IlpEquipmentView
.
This class is a CSS stylable JavaBean. 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 whether the aspect
ratio of the main window is kept when a zoom transformer is applied.
The properties minZoomXFactor
, minZoomYFactor
,
maxZoomXFactor
and maxZoomYFactor
configure the
minimal and maximal zoom factors that are accepted by the main window.
The properties wheelZoomingEnabled
and wheelScrollingEnabled
configure whether the graph view will respond to mouse wheel events.
IlpEquipmentView
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 if the main view keeps the aspect ratio in case
of 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 is 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 is 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
- If this parameter is true
, the
aspect ratio is kept.public void setMinZoomXFactor(double factor)
x
direction. When a minimal zoom factor is set, the view
verifies each modification of its transformer so that the zoom factor
remains larger than the minimal value.
The minimal zoom factor must be at least 0
and must be no
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()
x
direction.getMinZoomXFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setMinZoomXFactor(double)
public void setMaxZoomXFactor(double factor)
x
direction. When a maximal zoom factor is set, the view
verifies each modification of its transformer in order to keep the zoom
factor smaller than the maximal value.
The maximal zoom factor must be larger than 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()
x
direction.getMaxZoomXFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setMaxZoomXFactor(double)
public void setMinZoomYFactor(double factor)
y
direction. When a minimal zoom factor is set, the view verifies each
modification of its transformer in order to keep the zoom factor larger
than the minimal value.
The minimal zoom factor must be at least 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()
y
direction.getMinZoomYFactor
in class ilog.cpl.graph.css.renderer.IlpViewRenderer
setMinZoomYFactor(double)
public void setMaxZoomYFactor(double factor)
y
direction. When a maximal zoom factor is set, the view verifies each
modification of its transformer in order to keep the zoom factor smaller
than the maximal value. The maximal zoom factor must be larger than
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()
y
direction.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 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.