ilog.views
Class IlvConstantModeManagerFrame

java.lang.Object
  extended by ilog.views.IlvDefaultManagerFrame
      extended by ilog.views.IlvConstantModeManagerFrame
All Implemented Interfaces:
IlvManagerFrame, IlvResizableManagerFrame, IlvPersistentObject, Serializable

public class IlvConstantModeManagerFrame
extends IlvDefaultManagerFrame
implements IlvResizableManagerFrame

IlvConstantModeManagerFrame is an extended IlvDefaultManagerFrame that handles resize events automatically. IlvConstantModeManagerFrame keeps the sub manager zoom level constant by adjusting frame margins to meet the required size.

When a sub manager uses a IlvConstantModeManagerFrame, it has the following behavior:

Since:
JViews 7.5
See Also:
Serialized Form

Field Summary
 
Fields inherited from class ilog.views.IlvDefaultManagerFrame
BOTTOM, CENTER, LEFT, RIGHT, TOP, WRAPPED
 
Constructor Summary
IlvConstantModeManagerFrame()
          Creates a IlvConstantModeManagerFrame instance.
IlvConstantModeManagerFrame(float minimumMargin)
          Creates a Creates a IlvConstantModeManagerFrame instance.constant mode manager frame with a minimum margin.
IlvConstantModeManagerFrame(IlvConstantModeManagerFrame source)
          Creates an IlvConstantModeManagerFrame by copying the specified one.
IlvConstantModeManagerFrame(IlvInputStream stream)
          Reads an IlvConstantModeManagerFrame from an IlvInputStream.
 
Method Summary
 IlvManagerFrame copy()
          Creates an IlvConstantModeManagerFrame by copying itself.
 float getMinimumMargin()
          Gets the minimum margin allowed.
 void managerChanged(IlvManager manager)
          This function adjusts the margins after its manager has been changed.
 boolean moveResize(IlvManager manager, IlvRect size)
          Adjusts the margins to meet the specified size.
 void setBottomMargin(float margin)
          Sets the bottom margin.
 void setLeftMargin(float margin)
          Sets the left margin.
 void setMinimumMargin(float minimumMargin)
          Set the minimum margin allowed.
 void setRightMargin(float margin)
          Sets the right margin.
 void setTopMargin(float margin)
          Sets the top margin.
 void write(IlvOutputStream stream)
          Writes the frame to an IlvOutputStream.
 
Methods inherited from class ilog.views.IlvDefaultManagerFrame
checkZoomFactor, contains, draw, drawBackground, drawOutline, drawTitleBackground, drawTitleText, getBackground, getBottomMargin, getBottomMargin, getFont, getForeground, getLeftMargin, getLeftMargin, getMaxTitleZoomFactor, getMinTitleZoomFactor, getRightMargin, getRightMargin, getTitle, getTitle, getTitleColor, getTitleHeight, getTitleJustification, getTopMargin, getTopMargin, isOpaque, isOpaque, isShowingTitle, setBackground, setFont, setForeground, setMaxTitleZoomFactor, setMinTitleZoomFactor, setOpaque, setShowingTitle, setTitle, setTitleColor, setTitleJustification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.views.IlvManagerFrame
contains, draw, getBottomMargin, getLeftMargin, getRightMargin, getTopMargin, isOpaque
 

Constructor Detail

IlvConstantModeManagerFrame

public IlvConstantModeManagerFrame()
Creates a IlvConstantModeManagerFrame instance.


IlvConstantModeManagerFrame

public IlvConstantModeManagerFrame(float minimumMargin)
Creates a Creates a IlvConstantModeManagerFrame instance.constant mode manager frame with a minimum margin.

Parameters:
minimumMargin - The minimum margin allowed, must not be negative.

IlvConstantModeManagerFrame

public IlvConstantModeManagerFrame(IlvConstantModeManagerFrame source)
Creates an IlvConstantModeManagerFrame by copying the specified one.

Parameters:
source - The IlvConstantModeManagerFrame object to copy.
See Also:
copy()

IlvConstantModeManagerFrame

public IlvConstantModeManagerFrame(IlvInputStream stream)
                            throws IOException,
                                   IlvReadFileException
Reads an IlvConstantModeManagerFrame from an IlvInputStream.

Parameters:
stream - The input stream to read from.
Throws:
IOException
IlvReadFileException
Method Detail

copy

public IlvManagerFrame copy()
Creates an IlvConstantModeManagerFrame by copying itself.

Specified by:
copy in interface IlvManagerFrame
Overrides:
copy in class IlvDefaultManagerFrame

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the frame to an IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvDefaultManagerFrame
Parameters:
stream - The output stream.
Throws:
IOException - thrown when an exception occurs during the write operation for this object.

getMinimumMargin

public float getMinimumMargin()
Gets the minimum margin allowed.

Returns:
The minimum margin allowed.

setTopMargin

public void setTopMargin(float margin)
Sets the top margin. This method does not take into account the title.

Overrides:
setTopMargin in class IlvDefaultManagerFrame
Parameters:
margin - Must be greater than or equal to the minimum margin. If not, the minimum margin is set.

setBottomMargin

public void setBottomMargin(float margin)
Sets the bottom margin.

Overrides:
setBottomMargin in class IlvDefaultManagerFrame
Parameters:
margin - Must be greater than or equal to the minimum margin. If not, the minimum margin is set.

setLeftMargin

public void setLeftMargin(float margin)
Sets the left margin.

Overrides:
setLeftMargin in class IlvDefaultManagerFrame
Parameters:
margin - Must be greater than or equal to the minimum margin. If not, the minimum margin is set.

setRightMargin

public void setRightMargin(float margin)
Sets the right margin.

Overrides:
setRightMargin in class IlvDefaultManagerFrame
Parameters:
margin - Must be greater than or equal to the minimum margin. If not, the minimum margin is set.

setMinimumMargin

public void setMinimumMargin(float minimumMargin)
Set the minimum margin allowed. This function might adjust the margins so that they are all greater than or equal to the minimum margin.

Parameters:
minimumMargin - The minimum margin allowed, must not be negative.

moveResize

public boolean moveResize(IlvManager manager,
                          IlvRect size)
Adjusts the margins to meet the specified size. This method is called when the moveResize() of a submanager is called.

Specified by:
moveResize in interface IlvResizableManagerFrame
Overrides:
moveResize in class IlvDefaultManagerFrame
Parameters:
manager - The manager to be transformed. This object must have a IlvResizableManagerFrame manager frame.
size - The new size to be applied to the submanager.
Returns:
true, to indicate the frame is capable of resizing the inner manager.

managerChanged

public void managerChanged(IlvManager manager)
This function adjusts the margins after its manager has been changed. It is typically called by the applyTransform() method of the inner manager. When the bounding box of the inner manager grows, the frame tries to reduce the margins first in order to keep the global bounding box constant.

Specified by:
managerChanged in interface IlvResizableManagerFrame
Overrides:
managerChanged in class IlvDefaultManagerFrame
Parameters:
manager - The inner manager that has been changed.


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