ilog.views.graphic
Class IlvFilledLabel

java.lang.Object
  extended by ilog.views.IlvGraphic
      extended by ilog.views.graphic.IlvLabel
          extended by ilog.views.graphic.IlvFilledLabel
All Implemented Interfaces:
IlvFontInterface, IlvLabelInterface, IlvTextInterface, IlvPersistentObject, Transferable, Serializable

public class IlvFilledLabel
extends IlvLabel

A label with a colored background.

See Also:
Serialized Form

Constructor Summary
IlvFilledLabel()
          Creates a new IlvFilledLabel with a center in (0, 0) and an empty label.
IlvFilledLabel(IlvFilledLabel source)
          Creates a new IlvFilledLabel by copying an existing one.
IlvFilledLabel(IlvInputStream stream)
          Reads the object from an IlvInputStream.
IlvFilledLabel(IlvPoint center, String label)
          Creates a new IlvFilledLabel.
 
Method Summary
 IlvGraphic copy()
          Copies the object.
 void draw(Graphics dst, IlvTransformer t)
          Draws the object.
 Color getBackground()
          Returns the background color of the object.
 void setBackground(Color color)
          Changes the background color of the object.
 void write(IlvOutputStream stream)
          Writes the object to an IlvOutputStream.
 
Methods inherited from class ilog.views.graphic.IlvLabel
applyTransform, boundingBox, contains, getCaretShape, getCenter, getFont, getForeground, getLabel, getLabelBBox, isAntialiasing, lineCount, lineOffset, makeSelection, pickCharacter, setAntialiasing, setCenter, setFont, setForeground, setLabel, supportMultiline, toString, zoomable
 
Methods inherited from class ilog.views.IlvGraphic
addActionListener, addNamedPropertyListener, boundingBox, getAndAssociateObjectInteractor, getCenter, getDefaultInteractor, getGraphicBag, GetGraphicObject, getIntersectionWithOutline, getName, getNamedProperty, getObjectInteractor, getPopupMenu, getPopupMenu, getPopupMenuName, getProperty, getToolTipText, getToolTipText, getTopLevelGraphicBag, getTransferData, getTransferDataFlavors, hasProperty, inside, intersects, isDataFlavorSupported, isEditable, isInApplyToObject, isMovable, isPersistent, isSelectable, isVisible, move, move, moveResize, notifyObjectInteractorToManager, processActionEvent, reDraw, removeActionListener, removeNamedProperty, removeNamedPropertyListener, removeProperty, replaceProperty, resize, rotate, scale, setEditable, setFillOn, setGraphicBag, setInApplyToObject, setMovable, setName, setNamedProperty, setNameImpl, setObjectInteractor, setPopupMenu, setPopupMenuName, setProperty, setSelectable, setStrokeOn, setToolTipText, setVisible, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlvFilledLabel

public IlvFilledLabel()
Creates a new IlvFilledLabel with a center in (0, 0) and an empty label.

Since:
JViews 6.0
See Also:
IlvFilledLabel(IlvPoint, String)

IlvFilledLabel

public IlvFilledLabel(IlvPoint center,
                      String label)
Creates a new IlvFilledLabel.

Parameters:
center - the center point of the object.
label - the label of the object.

IlvFilledLabel

public IlvFilledLabel(IlvFilledLabel source)
Creates a new IlvFilledLabel by copying an existing one.

Parameters:
source - the origin object for the copy.

IlvFilledLabel

public IlvFilledLabel(IlvInputStream stream)
               throws IlvReadFileException
Reads the object from an IlvInputStream.

Parameters:
stream - the input stream.
Throws:
IlvReadFileException - if the format is not correct.
Method Detail

copy

public IlvGraphic copy()
Copies the object. This method copies the object by calling the copy constructor.

Overrides:
copy in class IlvLabel
Returns:
a copy of the object.
See Also:
IlvGraphic

draw

public void draw(Graphics dst,
                 IlvTransformer t)
Draws the object.

Overrides:
draw in class IlvLabel
Parameters:
dst - The destination Graphics.
t - The transformation used to draw the object.
See Also:
IlvGraphic.boundingBox(ilog.views.IlvTransformer), IlvGraphic.zoomable(), IlvGraphic

setBackground

public void setBackground(Color color)
Changes the background color of the object.

Overrides:
setBackground in class IlvGraphic
Parameters:
color - the new color.
See Also:
getBackground()

getBackground

public Color getBackground()
Returns the background color of the object.

See Also:
setBackground(java.awt.Color)

write

public void write(IlvOutputStream stream)
           throws IOException
Writes the object to an IlvOutputStream. Note that even if this is a public method, you should not call it directly, you should use the write methods of the manager.

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


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