ilog.cpl.equipment.renderer
Class IlpViewRenderer

java.lang.Object
  extended by ilog.cpl.graphic.css.renderer.IlpAbstractGraphicViewRenderer
      extended by ilog.cpl.graph.css.renderer.IlpAbstractRepresentationViewRenderer
          extended by ilog.cpl.graph.css.renderer.IlpViewRenderer
              extended by ilog.cpl.equipment.renderer.IlpViewRenderer

public class IlpViewRenderer
extends ilog.cpl.graph.css.renderer.IlpViewRenderer

This class gives control over the view of an 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.

Since:
JTGO 4.0
See Also:
IlpEquipmentView

Constructor Summary
IlpViewRenderer()
           
 
Method Summary
 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.
 
Methods inherited from class ilog.cpl.graph.css.renderer.IlpViewRenderer
getCSSID, reset
 
Methods inherited from class ilog.cpl.graph.css.renderer.IlpAbstractRepresentationViewRenderer
attach, getView, noteContainerAdded, noteContainerUpdated
 
Methods inherited from class ilog.cpl.graphic.css.renderer.IlpAbstractGraphicViewRenderer
detach, getContext, getGraphicView, isRendererEnabled, setRendererEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlpViewRenderer

public IlpViewRenderer()
Method Detail

isHorizontalScrollBarVisible

public boolean isHorizontalScrollBarVisible()
Returns true if the horizontal scrollbar is visible.

Overrides:
isHorizontalScrollBarVisible in class ilog.cpl.graph.css.renderer.IlpViewRenderer

setHorizontalScrollBarVisible

public void setHorizontalScrollBarVisible(boolean set)
Shows or hides the horizontal scrollbar.

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.

Overrides:
setHorizontalScrollBarVisible in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
set - If this parameter is true, the scrollbar is shown.
See Also:
setHorizontalScrollBarPolicy(int)

getHorizontalScrollBarPolicy

public int getHorizontalScrollBarPolicy()
Returns the horizontal scrollbar policy value.

Overrides:
getHorizontalScrollBarPolicy in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Since:
JViews 7.5
See Also:
setHorizontalScrollBarPolicy(int)

setHorizontalScrollBarPolicy

public void setHorizontalScrollBarPolicy(int policy)
Sets the policy when the horizontal scrollbar appears. Legal values are:

Overrides:
setHorizontalScrollBarPolicy in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
policy - one of the three values listed above
Throws:
IllegalArgumentException - if policy is not one of the legal values shown above
Since:
JViews 7.5
See Also:
getHorizontalScrollBarPolicy()

isVerticalScrollBarVisible

public boolean isVerticalScrollBarVisible()
Returns true if the vertical scrollbar is visible.

Overrides:
isVerticalScrollBarVisible in class ilog.cpl.graph.css.renderer.IlpViewRenderer

setVerticalScrollBarVisible

public void setVerticalScrollBarVisible(boolean set)
Shows or hides the vertical scrollbar.

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.

Overrides:
setVerticalScrollBarVisible in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
set - If this parameter is true, the scrollbar is shown.
See Also:
setVerticalScrollBarPolicy(int)

getVerticalScrollBarPolicy

public int getVerticalScrollBarPolicy()
Returns the vertical scrollbar policy value.

Overrides:
getVerticalScrollBarPolicy in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Since:
JViews 7.5
See Also:
setVerticalScrollBarPolicy(int)

setVerticalScrollBarPolicy

public void setVerticalScrollBarPolicy(int policy)
Sets the policy when the vertical scrollbar appears. Legal values are:

Overrides:
setVerticalScrollBarPolicy in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
policy - one of the three values listed above
Throws:
IllegalArgumentException - if policy is not one of the legal values shown above
Since:
JViews 7.5
See Also:
getVerticalScrollBarPolicy()

isKeepingAspectRatio

public boolean isKeepingAspectRatio()
Returns true if the aspect ratio in the main window is kept when a zoom transformer is applied.

Overrides:
isKeepingAspectRatio in class ilog.cpl.graph.css.renderer.IlpViewRenderer

setKeepingAspectRatio

public void setKeepingAspectRatio(boolean set)
Sets if the main view keeps the aspect ratio in case of zooming.

Overrides:
setKeepingAspectRatio in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
set - If this parameter is true, the aspect ratio is kept.

setMinZoomXFactor

public void setMinZoomXFactor(double factor)
Sets the minimal zoom factor allowed for the view in the 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.

Overrides:
setMinZoomXFactor in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
factor - The minimal zoom factor in the x direction.
Since:
JTGO 4.0
See Also:
getMinZoomXFactor(), setMaxZoomXFactor(double)

getMinZoomXFactor

public double getMinZoomXFactor()
Returns the minimal zoom factor allowed for the view in the x direction.

Overrides:
getMinZoomXFactor in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Since:
JTGO 4.0
See Also:
setMinZoomXFactor(double)

setMaxZoomXFactor

public void setMaxZoomXFactor(double factor)
Sets the maximal zoom factor allowed for the view in the 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.

Overrides:
setMaxZoomXFactor in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
factor - The maximal zoom factor in the x direction.
Since:
JTGO 4.0
See Also:
getMaxZoomXFactor(), setMinZoomXFactor(double)

getMaxZoomXFactor

public double getMaxZoomXFactor()
Returns the maximal zoom factor allowed for the view in the x direction.

Overrides:
getMaxZoomXFactor in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Since:
JTGO 4.0
See Also:
setMaxZoomXFactor(double)

setMinZoomYFactor

public void setMinZoomYFactor(double factor)
Sets the minimal zoom factor allowed for the view in the 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.

Overrides:
setMinZoomYFactor in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
factor - The minimal zoom factor in the y direction.
Since:
JTGO 4.0
See Also:
getMinZoomYFactor(), setMaxZoomYFactor(double)

getMinZoomYFactor

public double getMinZoomYFactor()
Returns the minimal zoom factor allowed for the view in the y direction.

Overrides:
getMinZoomYFactor in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Since:
JTGO 4.0
See Also:
setMinZoomYFactor(double)

setMaxZoomYFactor

public void setMaxZoomYFactor(double factor)
Sets the maximal zoom factor allowed for the view in the 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.

Overrides:
setMaxZoomYFactor in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
factor - The maximal zoom factor in the y direction.
Since:
JTGO 4.0
See Also:
getMaxZoomYFactor(), setMinZoomYFactor(double)

getMaxZoomYFactor

public double getMaxZoomYFactor()
Returns the maximal zoom factor allowed for the view in the y direction.

Overrides:
getMaxZoomYFactor in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Since:
JTGO 4.0
See Also:
setMaxZoomYFactor(double)

isWheelScrollingEnabled

public boolean isWheelScrollingEnabled()
Indicates whether or not scrolling will take place in response to movement of the mouse wheel. Wheel scrolling is enabled by default.

Overrides:
isWheelScrollingEnabled in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Since:
JViews 7.5
See Also:
setWheelScrollingEnabled(boolean)

setWheelScrollingEnabled

public void setWheelScrollingEnabled(boolean set)
Enables/disables scrolling in response to movement of the mouse wheel.

Overrides:
setWheelScrollingEnabled in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
set - true if scrolling should be done automatically for a MouseWheelEvent, false otherwise.
Since:
JViews 7.5
See Also:
isWheelScrollingEnabled()

isWheelZoomingEnabled

public boolean isWheelZoomingEnabled()
Indicates whether or not zooming will take place in response to movement of the mouse wheel plus control key pressed.

Overrides:
isWheelZoomingEnabled in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Since:
JViews 7.5
See Also:
setWheelZoomingEnabled(boolean)

setWheelZoomingEnabled

public void setWheelZoomingEnabled(boolean set)
Enables/disables zooming in response to movement of the mouse wheel plus control key pressed.

Overrides:
setWheelZoomingEnabled in class ilog.cpl.graph.css.renderer.IlpViewRenderer
Parameters:
set - true if zooming should be done automatically for a MouseWheelEvent, false otherwise.
Since:
JViews 7.5
See Also:
isWheelZoomingEnabled()


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.