Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

oracle.dss.gauge
Class DrawableObject.Label

java.lang.Object
  extended by oracle.dss.gauge.DrawableObject
      extended by oracle.dss.gauge.DrawableObject.Label
Direct Known Subclasses:
DrawableObject.TickLabel
Enclosing class:
DrawableObject

public static class DrawableObject.Label
extends DrawableObject

This class defines a label.


Nested Class Summary
 
Nested classes/interfaces inherited from class oracle.dss.gauge.DrawableObject
DrawableObject.Image, DrawableObject.Label, DrawableObject.Shape, DrawableObject.TickLabel, DrawableObject.Transform
 
Field Summary
 
Fields inherited from class oracle.dss.gauge.DrawableObject
m_transform
 
Constructor Summary
DrawableObject.Label(int compType, java.awt.Graphics2D g, java.lang.String text, java.awt.Font font, java.awt.Color fontColor, java.awt.Rectangle bounds, java.lang.String labelType, java.awt.geom.AffineTransform transform)
          Constructor for creating an DrawableObject instance of Label
DrawableObject.Label(int compType, java.awt.Graphics2D g, java.lang.String text, java.awt.Font font, java.awt.Color fontColor, java.awt.Rectangle bounds, java.lang.String labelType, java.awt.geom.AffineTransform transform, double angle)
          Constructor for creating an DrawableObject instance of Label
 
Method Summary
 boolean contains(double x, double y, boolean useTruncated)
          Perform an inclusion test on the object based on the given point
 double getAngle()
          Gets the text rotation angle for this label.
 java.awt.Rectangle getBounds()
          Gets the bounding rectangle for this label.
 java.awt.Font getFont()
          Gets the font for this label.
 java.awt.Color getFontColor()
          Gets the font color for this label.
 java.awt.Graphics2D getGraphics()
          Gets the graphics object for this label.
 java.lang.String getLabelType()
          Gets the type of this tick label.
 java.lang.String getText()
          Gets the text for this label.
 java.awt.Rectangle getTruncatedBounds()
           
 java.lang.String getTruncatedText()
           
 void setTruncatedBounds(java.awt.Rectangle bounds)
           
 void setTruncatedText(java.lang.String text)
           
 
Methods inherited from class oracle.dss.gauge.DrawableObject
getAffineTransform, getComponentIndex, getComponentType, getLabelDimensions, getLabelObject, getTickLabelObject, isSelected, isVisible, render, setSelected, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawableObject.Label

public DrawableObject.Label(int compType,
                            java.awt.Graphics2D g,
                            java.lang.String text,
                            java.awt.Font font,
                            java.awt.Color fontColor,
                            java.awt.Rectangle bounds,
                            java.lang.String labelType,
                            java.awt.geom.AffineTransform transform)
Constructor for creating an DrawableObject instance of Label

Parameters:
transform - Instance of AffineTransform to apply to this shape before rendering it
labelType - Type of label; can be TOP_LABEL, BOTTOM_LABEL, METRIC_LABEL_POSITION, ELEMENTA_TOPLABEL, ELEMENTA_BOTTOMLABEL, ELEMENTB_TOPLABEL, ELEMENTB_BOTTOMLABEL, INTERSECTIONAB_TOPLABEL, and INTERSECTIONAB_BOTTOMLABEL from GaugeAttributes class
bounds - Rectangle in which this label should be drawn
fontColor - Color to use on drawing the text of this label
font - Font to use for this label
text - String value for this label
g - Graphics2D instance to use for setup of this label
compType - Type of component to which this object belongs; valid values are constants in the GaugeConstants class beginning with ID_

DrawableObject.Label

public DrawableObject.Label(int compType,
                            java.awt.Graphics2D g,
                            java.lang.String text,
                            java.awt.Font font,
                            java.awt.Color fontColor,
                            java.awt.Rectangle bounds,
                            java.lang.String labelType,
                            java.awt.geom.AffineTransform transform,
                            double angle)
Constructor for creating an DrawableObject instance of Label

Parameters:
transform - Instance of AffineTransform to apply to this shape before rendering it
labelType - Type of label; can be TOP_LABEL, BOTTOM_LABEL, METRIC_LABEL_POSITION, ELEMENTA_TOPLABEL, ELEMENTA_BOTTOMLABEL, ELEMENTB_TOPLABEL, ELEMENTB_BOTTOMLABEL, INTERSECTIONAB_TOPLABEL, and INTERSECTIONAB_BOTTOMLABEL from GaugeAttributes class
bounds - Rectangle in which this label should be drawn
fontColor - Color to use on drawing the text of this label
font - Font to use for this label
text - String value for this label
g - Graphics2D instance to use for setup of this label
compType - Type of component to which this object belongs; valid values are constants in the GaugeConstants class beginning with ID_
Method Detail

contains

public boolean contains(double x,
                        double y,
                        boolean useTruncated)
Perform an inclusion test on the object based on the given point

Specified by:
contains in class DrawableObject
Parameters:
useTruncated - True if the truncated rectangle should be used, False otherwise
y - Integer representing the Y location of the point
x - Integer representing the X location of the point
Returns:
True if the point is contained within this object, False otherwise

getGraphics

public java.awt.Graphics2D getGraphics()
Gets the graphics object for this label.

Returns:
Graphics2D instance.
See Also:
Graphics2D

getText

public java.lang.String getText()
Gets the text for this label.

Returns:
String instance.

getFont

public java.awt.Font getFont()
Gets the font for this label.

Returns:
Font instance.
See Also:
Font

getFontColor

public java.awt.Color getFontColor()
Gets the font color for this label.

Returns:
Color instance.
See Also:
Color

getAngle

public double getAngle()
Gets the text rotation angle for this label.

Returns:
double angle.

getBounds

public java.awt.Rectangle getBounds()
Gets the bounding rectangle for this label.

Returns:
Rectangle instance.
See Also:
Rectangle

getLabelType

public java.lang.String getLabelType()
Gets the type of this tick label.

Returns:
Type of this label

getTruncatedText

public java.lang.String getTruncatedText()
Returns:
String instance.
For internal use only. Application developers should not use this
Gets the truncated text for this label. Defaults to NULL, but is set if the Gauge Engine determines the text should be truncated.

setTruncatedText

public void setTruncatedText(java.lang.String text)
For internal use only. Application developers should not use this
Gets the truncated text for this label. Defaults to NULL, but is set if the Gauge Engine determines the text should be truncated.

getTruncatedBounds

public java.awt.Rectangle getTruncatedBounds()
Returns:
Rectangle instance.
See Also:
Rectangle
For internal use only. Application developers should not use this
Gets the bounds for this label if it is truncated. Defaults to NULL, but is set if the Gauge Engine determines the text should be truncated.

setTruncatedBounds

public void setTruncatedBounds(java.awt.Rectangle bounds)
For internal use only. Application developers should not use this
Gets the rectangle for this label if it is truncated. Defaults to NULL, but is set if the Gauge Engine determines the text should be truncated.

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

Copyright © 1997, 2013, Oracle. All rights reserved.