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:
IlvManager.moveResize(IlvRect)
but not IlvManager.applyTransform(IlvTransformer)
.
Call IlvManager.applyTransform(IlvTransformer)
to apply a specific
transformation only.
IlvConstantModeManagerFrame
objects cannot have negative margins,
when both left and right margins become zero, the sub manager stops the reshape
operation.
IlvConstantModeManagerFrame
objects listens to sub manager or
grapher content changes. When the bounding box of the sub manager grows, in
order to keep the global bounding box constant the frame tries to reduce the
margins first.
IlvConstantModeManagerFrame
among different managers, but allocate a new frame for each manager.
If you share the frame, resizing the manager frame interactively will not
work.
Constructor and Description |
---|
IlvConstantModeManagerFrame()
Creates a
IlvConstantModeManagerFrame instance. |
IlvConstantModeManagerFrame(double 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 . |
Modifier and Type | Method and Description |
---|---|
IlvManagerFrame |
copy()
Creates an
IlvConstantModeManagerFrame by copying itself. |
double |
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(double margin)
Sets the bottom margin.
|
void |
setLeftMargin(double margin)
Sets the left margin.
|
void |
setMinimumMargin(double minimumMargin)
Set the minimum margin allowed.
|
void |
setRightMargin(double margin)
Sets the right margin.
|
void |
setTopMargin(double margin)
Sets the top margin.
|
void |
write(IlvOutputStream stream)
Writes the frame to an
IlvOutputStream . |
baseTextDirectionChanged, boundingBoxExpandCollapseIcon, checkZoomFactor, componentOrientationChanged, contains, draw, drawBackground, drawExpandCollapseIcon, drawOutline, drawShadow, drawTitleBackground, drawTitleText, getAbsoluteExpandCollapseIconPosition, getBackground, getBaseTextDirection, getBottomMargin, getBottomMargin, getExpandCollapseIcon, getExpandCollapseIconPosition, getFont, getForeground, getLeftMargin, getLeftMargin, getMaxTitleZoomFactor, getMinTitleZoomFactor, getOpaque, getRelativeExpandCollapseIconPosition, getResolvedBaseTextDirection, getResolvedBaseTextDirection, getRightMargin, getRightMargin, getShadowPaint, getShadowPosition, getShadowThickness, getTitle, getTitle, getTitleColor, getTitleHeight, getTitleJustification, getTopMargin, getTopMargin, isOpaque, isShowingExpandCollapseIcon, isShowingTitle, localeChanged, setAbsoluteExpandCollapseIconPosition, setBackground, setBaseTextDirection, setBaseTextDirection, setExpandCollapseIcon, setExpandCollapseIconPosition, setFont, setForeground, setMaxTitleZoomFactor, setMinTitleZoomFactor, setOpaque, setRelativeExpandCollapseIconPosition, setShadowPaint, setShadowPosition, setShadowThickness, setShowingExpandCollapseIcon, setShowingTitle, setTitle, setTitleColor, setTitleJustification
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contains, draw, getBottomMargin, getLeftMargin, getRightMargin, getTopMargin, isOpaque
public IlvConstantModeManagerFrame()
IlvConstantModeManagerFrame
instance.public IlvConstantModeManagerFrame(double minimumMargin)
IlvConstantModeManagerFrame
instance.constant mode manager frame with a minimum margin.minimumMargin
- The minimum margin allowed, must not be negative.public IlvConstantModeManagerFrame(IlvConstantModeManagerFrame source)
IlvConstantModeManagerFrame
by copying the
specified one.source
- The IlvConstantModeManagerFrame
object
to copy.copy()
public IlvConstantModeManagerFrame(IlvInputStream stream) throws IOException, IlvReadFileException
IlvConstantModeManagerFrame
from an
IlvInputStream
.stream
- The input stream to read from.IOException
IlvReadFileException
public IlvManagerFrame copy()
IlvConstantModeManagerFrame
by copying itself.copy
in interface IlvManagerFrame
copy
in class IlvDefaultManagerFrame
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvDefaultManagerFrame
stream
- The output stream.IOException
- thrown when an exception occurs during
the write operation for this object.public double getMinimumMargin()
public void setTopMargin(double margin)
setTopMargin
in class IlvDefaultManagerFrame
margin
- Must be greater than or equal to the minimum margin.
If not, the minimum margin is set.public void setBottomMargin(double margin)
setBottomMargin
in class IlvDefaultManagerFrame
margin
- Must be greater than or equal to the minimum margin.
If not, the minimum margin is set.public void setLeftMargin(double margin)
setLeftMargin
in class IlvDefaultManagerFrame
margin
- Must be greater than or equal to the minimum margin.
If not, the minimum margin is set.public void setRightMargin(double margin)
setRightMargin
in class IlvDefaultManagerFrame
margin
- Must be greater than or equal to the minimum margin.
If not, the minimum margin is set.public void setMinimumMargin(double minimumMargin)
minimumMargin
- The minimum margin allowed, must not be negative.public boolean moveResize(IlvManager manager, IlvRect size)
moveResize()
of a submanager is called.moveResize
in interface IlvResizableManagerFrame
moveResize
in class IlvDefaultManagerFrame
manager
- The manager to be transformed. This object must have a
IlvResizableManagerFrame
manager frame.size
- The new size to be applied to the submanager.true
, to indicate the frame is capable of resizing the inner
manager.public void managerChanged(IlvManager manager)
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.managerChanged
in interface IlvResizableManagerFrame
managerChanged
in class IlvDefaultManagerFrame
manager
- The inner manager that has been changed.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.