|
||||||||||
| PREV CLASS Documentation homepage. NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvDefaultManagerFrame
public class IlvDefaultManagerFrame
The default frame for an IlvManager.
The IlvDefaultManagerFrame class defines
the default frame that is drawn around an IlvManager when
this manager is added into another manager. This class
defines the margin that will be added around the manager.
A title can be drawn on the top and you can specify the alignment of the
title. By default the title is the name of the manager.
You can change the horizontal alignment of the title. The default is left aligned. Since JViews 8.0, you can specify the vertical alignment of the title. The default is top aligned, if you have not specified the vertical alignment. This allows you to keep the compatibility with previous versions.
IlvManager.setFrame(ilog.views.IlvManagerFrame),
Serialized Form| Field Summary | |
|---|---|
static int |
BOTTOM
Defines the BOTTOM alignment for the title. |
static int |
CENTER
Defines the CENTER alignment for the title. |
static int |
LEFT
Defines the LEFT alignment for the title. |
static int |
RIGHT
Defines the RIGHT alignment for the title. |
static int |
TOP
Defines the TOP alignment for the title. |
static int |
WRAPPED
Indicates that the title can be wrapped. |
| Constructor Summary | |
|---|---|
IlvDefaultManagerFrame()
Creates a default manager frame. |
|
IlvDefaultManagerFrame(IlvDefaultManagerFrame source)
Creates an IlvDefaultManagerFrame
by copying the specified one. |
|
IlvDefaultManagerFrame(IlvInputStream stream)
Reads an IlvDefaultManagerFrame from an
IlvInputStream. |
|
| Method Summary | |
|---|---|
protected double |
checkZoomFactor(IlvTransformer t)
This utility function checks the zoom factor of the given transformer. |
boolean |
contains(IlvManager manager,
IlvPoint p,
IlvPoint tp,
IlvTransformer t)
Tests if a point lies within the outline of the frame. |
IlvManagerFrame |
copy()
Creates an IlvDefaultManagerFrame by copying
this one. |
void |
draw(IlvManager manager,
IlvRect bbox,
Graphics g,
IlvTransformer t)
Draws the frame. |
protected void |
drawBackground(IlvManager manager,
IlvRect bbox,
Graphics grp,
IlvTransformer transf)
This method fills the given bounding box with the background color. |
protected void |
drawOutline(IlvManager manager,
IlvRect bbox,
Graphics grp,
IlvTransformer transf)
This method draws the border of the manager frame outline. |
protected void |
drawTitleBackground(IlvManager manager,
IlvRect bbox,
Graphics grp,
IlvTransformer transf)
This method fills the given bounding box with the background color. |
protected void |
drawTitleText(IlvManager manager,
IlvRect bbox,
Graphics grp,
IlvTransformer transf)
This method draws the title text within the title area. |
Paint |
getBackground()
Returns the Paint object used to draw the background of the
manager when the frame is opaque. |
float |
getBottomMargin()
Returns the bottom margin. |
float |
getBottomMargin(IlvManager manager,
IlvTransformer t)
Returns the margin on the bottom of the specified manager. |
Font |
getFont()
Returns the font used to draw the text of the title. |
Color |
getForeground()
Returns the color used to draw the frame. |
float |
getLeftMargin()
Returns the left margin. |
float |
getLeftMargin(IlvManager manager,
IlvTransformer t)
Returns the margin on the left of the specified manager. |
double |
getMaxTitleZoomFactor()
Returns the maximum zoom factor for the title. |
double |
getMinTitleZoomFactor()
Returns the minimum zoom factor for the title. |
float |
getRightMargin()
Returns the right margin. |
float |
getRightMargin(IlvManager manager,
IlvTransformer t)
Returns the margin on the right of the specified manager. |
String |
getTitle()
Returns the title of the frame. |
protected String |
getTitle(IlvManager m)
Returns the title of the frame. |
Color |
getTitleColor()
Returns the color used to draw the text of the title. |
float |
getTitleHeight(IlvManager manager,
IlvTransformer t)
Returns the height of the frame title. |
int |
getTitleJustification()
Returns the justification of the frame title. |
float |
getTopMargin()
Returns the top margin. |
float |
getTopMargin(IlvManager manager,
IlvTransformer t)
Returns the total top margin for a specified manager. |
boolean |
isOpaque()
Deprecated. Beginning with ILOG JViews 8.1, use isOpaque(IlvManager)
instead. |
boolean |
isOpaque(IlvManager manager)
Returns true if the frame is opaque meaning that
the frame is filling the background of the manager. |
boolean |
isShowingTitle()
Returns whether the title is visible or not. |
void |
managerChanged(IlvManager manager)
This function adjusts the frame in reaction to the inner manager's change. |
boolean |
moveResize(IlvManager manager,
IlvRect size)
This function invalidates the frame and does not handle the inner manager's resizing. |
void |
setBackground(Paint p)
Changes the Paint object used to draw the background of the
manager when the frame is opaque. |
void |
setBottomMargin(float margin)
Sets the bottom margin. |
void |
setFont(Font font)
Changes the font used to draw the text of the title. |
void |
setForeground(Color color)
Changes the color used to draw the frame. |
void |
setLeftMargin(float margin)
Sets the left margin. |
void |
setMaxTitleZoomFactor(double maxTitleZoomFactor)
Sets the maximum title zoom factor for the title. |
void |
setMinTitleZoomFactor(double minTitleZoomFactor)
Sets the minimum zoom factor for the title. |
void |
setOpaque(boolean value)
Changes the opacity of the frame. |
void |
setRightMargin(float margin)
Sets the right margin. |
void |
setShowingTitle(boolean set)
Shows or hides the title. |
void |
setTitle(String title)
Sets the title of the frame. |
void |
setTitleColor(Color color)
Changes the color used to draw the text of the title. |
void |
setTitleJustification(int value)
Changes the justification of the frame title. |
void |
setTopMargin(float margin)
Sets the top margin. |
void |
write(IlvOutputStream stream)
Writes the frame to an IlvOutputStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LEFT
public static final int CENTER
public static final int RIGHT
public static final int TOP
public static final int BOTTOM
public static final int WRAPPED
| Constructor Detail |
|---|
public IlvDefaultManagerFrame()
public IlvDefaultManagerFrame(IlvDefaultManagerFrame source)
IlvDefaultManagerFrame
by copying the specified one.
source - the origin of the copy.copy()
public IlvDefaultManagerFrame(IlvInputStream stream)
throws IOException,
IlvReadFileException
IlvDefaultManagerFrame from an
IlvInputStream.
stream - The input stream.
IOException
IlvReadFileException| Method Detail |
|---|
public IlvManagerFrame copy()
IlvDefaultManagerFrame by copying
this one.
copy in interface IlvManagerFrame
public void write(IlvOutputStream stream)
throws IOException
IlvOutputStream.
write in interface IlvPersistentObjectstream - The output stream.
IOException - thrown when an exception occurs during
the write operation for this object.
public float getTopMargin(IlvManager manager,
IlvTransformer t)
The total top margin is the sum of the height of the title plus the top margin, if the title is top aligned.
getTopMargin in interface IlvManagerFramemanager - The inner manager.t - The transformer used to draw the manager and the frame.
getTitleHeight(IlvManager, IlvTransformer),
getTopMargin()
public boolean moveResize(IlvManager manager,
IlvRect size)
moveResize in interface IlvResizableManagerFramemanager - The submanager to be transformed.size - The new size of the submanager.
false.public void managerChanged(IlvManager manager)
afterTransform() method of the inner manager.
managerChanged in interface IlvResizableManagerFramemanager - The inner manager that has been changed.protected double checkZoomFactor(IlvTransformer t)
t - The transformer to be checked.
setMaxTitleZoomFactor(double),
getMaxTitleZoomFactor(),
setMinTitleZoomFactor(double),
getMinTitleZoomFactor()
public float getTitleHeight(IlvManager manager,
IlvTransformer t)
manager - The inner manager.t - The transformer used to draw both the manager and the frame.
0 if the frame has
no title or if isShowingTitle() returns false.isShowingTitle(),
getTitle(IlvManager),
getMinTitleZoomFactor(),
getMaxTitleZoomFactor()public float getTopMargin()
public void setTopMargin(float margin)
public float getBottomMargin(IlvManager manager,
IlvTransformer t)
getBottomMargin in interface IlvManagerFramemanager - The inner manager.t - The transformer used to draw the manager and the frame.public float getBottomMargin()
public void setBottomMargin(float margin)
public float getRightMargin(IlvManager manager,
IlvTransformer t)
getRightMargin in interface IlvManagerFramemanager - The inner manager.t - The transformer used to draw the manager and the frame.public float getRightMargin()
public void setRightMargin(float margin)
public float getLeftMargin(IlvManager manager,
IlvTransformer t)
getLeftMargin in interface IlvManagerFramemanager - The inner manager.t - The transformer used to draw the manager and the frame.public float getLeftMargin()
public void setLeftMargin(float margin)
public boolean isOpaque(IlvManager manager)
true if the frame is opaque meaning that
the frame is filling the background of the manager.
isOpaque in interface IlvManagerFramemanager - The inner manager.setOpaque(boolean)public boolean isOpaque()
isOpaque(IlvManager)
instead.
true if the frame is opaque meaning that
the frame is filling the background of the manager.
setOpaque(boolean)public void setOpaque(boolean value)
value - The new opacity.isOpaque(IlvManager),
getBackground()public Color getTitleColor()
setTitleColor(java.awt.Color)public void setTitleColor(Color color)
color - The new color.getTitleColor()public Font getFont()
setTitleColor(java.awt.Color)public void setFont(Font font)
font - The new font.getFont()public Paint getBackground()
Paint object used to draw the background of the
manager when the frame is opaque.
setBackground(java.awt.Paint),
setOpaque(boolean)public void setBackground(Paint p)
Paint object used to draw the background of the
manager when the frame is opaque.
getBackground(),
setOpaque(boolean)public Color getForeground()
setForeground(java.awt.Color)public void setForeground(Color color)
color - The new color.getForeground()public boolean isShowingTitle()
setShowingTitle(boolean),
getTitle(),
getTitleColor(),
getFont(),
getTitleJustification()public void setShowingTitle(boolean set)
set - The new value.isShowingTitle(),
getTitle(),
getTitleColor(),
getFont(),
getTitleJustification()public void setTitleJustification(int value)
value - The new justification can be a combination from the next 3 groups:
Examples: LEFT, LEFT|BOTTOM, CENTER|BOTTOM|WRAPPEDsetTitleJustification(int),
isShowingTitle()public int getTitleJustification()
setTitleJustification(int) for possible values.
setTitleJustification(int),
isShowingTitle()
public void draw(IlvManager manager,
IlvRect bbox,
Graphics g,
IlvTransformer t)
draw in interface IlvManagerFramemanager - The inner manager.bbox - The bounding box of the manager.g - The Graphics used to draw the frame.t - The transformer used to draw the frame.
protected void drawTitleText(IlvManager manager,
IlvRect bbox,
Graphics grp,
IlvTransformer transf)
draw method
(draw(IlvManager, IlvRect, Graphics, IlvTransformer)).
If needed, sublcasses can override this method.
manager - The inner manager.bbox - The bounding box of the title area.grp - The Graphics used to draw the text.transf - The transformer from identity to drawing space.
protected void drawTitleBackground(IlvManager manager,
IlvRect bbox,
Graphics grp,
IlvTransformer transf)
draw method
(draw(IlvManager, IlvRect, Graphics, IlvTransformer))
to handle the drawing of the background of the text area.
If needed, subclasses can override this method.
manager - The inner manager.bbox - The bounding box of the title area.grp - The Graphics used to draw the text.transf - The transformer from identity to drawing space.
protected void drawBackground(IlvManager manager,
IlvRect bbox,
Graphics grp,
IlvTransformer transf)
draw method
(draw(IlvManager, IlvRect, Graphics, IlvTransformer))
to handle the drawing of the background of the frame (excluding the
title area).
If needed, subclasses can override this method.
manager - The inner manager.bbox - The bounding box of the title area.grp - The Graphics used to draw the text.transf - The transformer from identity to drawing space.
protected void drawOutline(IlvManager manager,
IlvRect bbox,
Graphics grp,
IlvTransformer transf)
draw method
(draw(IlvManager, IlvRect, Graphics, IlvTransformer))
to handle the drawing of the outline of the frame (including the
text area).
If needed, subclasses can override this method.
manager - The inner manager.bbox - The bounding box of the title area.grp - The Graphics used to draw the text.transf - The transformer from identity to drawing space.
public boolean contains(IlvManager manager,
IlvPoint p,
IlvPoint tp,
IlvTransformer t)
contains in interface IlvManagerFramemanager - The inner manager.p - The point to be tested.tp - The point p transformed by the transformer t.t - The transformation that is used to draw the frame.protected String getTitle(IlvManager m)
setTitle(java.lang.String) was called with a
non-null title string, this string is returned.
Otherwise, this method returns the name of the manager
(IlvGraphic.getName()). If the manager has no name, it
returns the string 'Untitled'.
public void setTitle(String title)
title - The new title of the frame.getTitle(ilog.views.IlvManager)public String getTitle()
setTitle(java.lang.String),
getTitle(ilog.views.IlvManager)public double getMinTitleZoomFactor()
public void setMinTitleZoomFactor(double minTitleZoomFactor)
minTitleZoomFactor - The new minimum zoom factor.public double getMaxTitleZoomFactor()
public void setMaxTitleZoomFactor(double maxTitleZoomFactor)
maxTitleZoomFactor - The new zoom factor for the title.
|
||||||||||
| PREV CLASS Documentation homepage. NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||