Skip navigation links

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

E12063-01


oracle.dss.gauge
Class SFX

java.lang.Object
  extended by oracle.dss.dataView.BaseComponentXML
      extended by oracle.dss.gauge.SFX

All Implemented Interfaces:
oracle.dss.presutil.GradientSupport
Direct Known Subclasses:
ThresholdSFX

public class SFX
extends BaseComponentXML
implements oracle.dss.presutil.GradientSupport

Allows you to apply attributes for special effects to the gauge. You can use special effects on the gauge components that have a getSFX method, such as the PlotArea, the Indicator, the GaugeSetBackground, and the GaugeBackground.

Since:
11.0

Field Summary
static java.util.HashMap DEFAULT_MAP
           
protected  CommonGauge m_commonGauge
           

 

Fields inherited from class oracle.dss.dataView.BaseComponentXML
m_jsfHashMap

 

Fields inherited from interface oracle.dss.presutil.GradientSupport
a_fillType, a_gradientDirection, a_gradientNumStops, a_gradientReversed, a_gradientStopColor, a_gradientStopPosition, a_visualEffects, GRADIENTPINSTYLE_NAME, GRADIENTSTOPSTYLE_NAME

 

Constructor Summary
SFX(CommonGauge gauge, int compID)
           

 

Method Summary
static java.util.HashMap cloneDefaultMap()
           
static int convertGradientDirectionToInt(java.lang.String dir)
           
static java.lang.String convertGradientDirectionToString(int direction)
           
static int convertGradientFillTypeToInt(java.lang.String type)
           
static java.lang.String convertGradientFillTypeToString(int fillType)
           
static int convertVisualEffectsToInt(java.lang.String vfxString)
           
static java.lang.String convertVisualEffectsToString(int vfx)
           
protected  java.util.HashMap getAttributeMap()
           
protected  java.util.HashMap getAttributeMapNoDefault()
           
protected  java.lang.String getComponentName()
           
 int getFillType()
          Retrieves the fill type for the gauge, such as color and gradient.
protected  java.awt.geom.Point2D getGradientCenter()
           
 int getGradientDirection()
          Retrieves the gradient direction for the gauge.
 int getGradientNumStops()
          Retrieves the number of stops in the gradient.
 java.awt.Color getGradientStopColor(int index)
          Retrieves the color of a stop.
 double getGradientStopPosition(int index)
          Retrieves position of a stop in the gradient of the gauge.
protected  oracle.dss.util.xml.ObjectNode getGradientStopStyleXML(boolean allProperties, int stopIndex)
           
 int getVisualEffects()
          Gets the visual effects value for this SFX object.
protected  oracle.dss.util.xml.ContainerNode getXML(boolean allProperties, boolean allOverriddenProperties)
           
 boolean isGradientReversed()
          Indicates whether the gradient direction is reversed.
 void setFillType(int type)
          Specifies the fill type for the gauge, such as color or gradient.
protected  void setGradientCenter(java.awt.geom.Point2D point)
           
 void setGradientDirection(int dir)
          Specifies the gradient direction for the gauge.
 void setGradientNumStops(int numStops)
          Specifies the number of stops in the gradient of the gauge.
 void setGradientReversed(boolean reverse)
          Specifies whether to reverse the gradient direction.
 void setGradientStopColor(java.awt.Color newColor, int index)
          Specifies the color of a stop.
 void setGradientStopPosition(double newPos, int index)
          Sets the position of a stop in a gradient.
 void setVisualEffects(int vfx)
          Sets the visual effects value for this SFX object.
protected  void setXML(oracle.dss.util.xml.ContainerNode node, boolean allProperties)
           

 

Methods inherited from class oracle.dss.dataView.BaseComponentXML
getNonstyleXML, getStyleXML, getStyleXML, getXML, setNonstyleXML, setNonstyleXML, setStyleXML, setXML, setXML, setXML, setXML

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

m_commonGauge

protected CommonGauge m_commonGauge
For internal use only. Application developers should not use this

DEFAULT_MAP

public static final java.util.HashMap DEFAULT_MAP

Constructor Detail

SFX

public SFX(CommonGauge gauge,
           int compID)
Parameters:
gauge - The gauge that this object belongs to.
compID - ID of the component to which these effects apply
For internal use only. Application developers should not use this
Constructor. Application developers should not have to construct this object, because the gauge does it automatically.

Method Detail

getFillType

public int getFillType()
Retrieves the fill type for the gauge, such as color and gradient.
Specified by:
getFillType in interface oracle.dss.presutil.GradientSupport
Returns:
A constant that represents the fill type for the gauge. Possible constants are listed in the See Also section.
See Also:
DataviewConstants.FT_COLOR, DataviewConstants.FT_GRADIENT

setFillType

public void setFillType(int type)
Specifies the fill type for the gauge, such as color or gradient.

If you set the FillType to GaugeConstants.FT_GRADIENT, then you should set the other gradient properties.

Specified by:
setFillType in interface oracle.dss.presutil.GradientSupport
Parameters:
type - A constant that represents the fill type for the gauge. Valid constants are listed in the See Also section.
See Also:
DataviewConstants.FT_COLOR, DataviewConstants.FT_GRADIENT

getGradientDirection

public int getGradientDirection()
Retrieves the gradient direction for the gauge. Gradient direction indicates the direction toward which a solid fill color begins to fade and mix into another color.

Unless the gradient is reversed, it moves from stop 0 to stop 1 and so on, to the total number of stops. For example, if you set the number of stops to 2, set stop 0 to gray and stop 1 to blue, and you set the gradient direction to GD_DOWN, then the top of the gradient will be gray and the bottom will be blue.

You can get an opposite direction by calling setGradientReversed. For example, reversing the previous gradient makes it go up, with gray at the bottom and blue at the top.

Specified by:
getGradientDirection in interface oracle.dss.presutil.GradientSupport
Returns:
A constant that represents the gradient direction for the gauge. Possible constants are listed in the See Also section.
See Also:
DataviewConstants.GD_DOWN, DataviewConstants.GD_RADIAL, DataviewConstants.GD_RIGHT, DataviewConstants.GD_DIAGONAL_45, DataviewConstants.GD_DIAGONAL_135, DataviewConstants.GD_RADIAL_OFF_CENTER

setGradientDirection

public void setGradientDirection(int dir)
Specifies the gradient direction for the gauge. Gradient direction indicates the direction toward which a solid fill color begins to fade and mix into another color.

Unless the gradient is reversed, it moves from stop 0 to stop 1 and so on, to the total number of stops. For example, if you set the number of stops to 2, set stop 0 to gray and stop 1 to blue, and you set the gradient direction to GD_DOWN, then the top of the gradient will be gray and the bottom will be blue.

You can get an opposite direction by calling setGradientReversed. For example, reversing the previous gradient makes it go up, with gray at the bottom and blue at the top.

Note that this method does not call the setGradientReversed method. Given the previous example, if you then set GradientReversed to true, then the gradient will go from gray at the bottom to blue at the top. If you then set the gradient direction to GD_RIGHT, the GradientReversed property remains true, so the gradient will go from right to left instead of from left to right.

Specified by:
setGradientDirection in interface oracle.dss.presutil.GradientSupport
Parameters:
dir - A constant that represents the gradient direction for the gauge. Valid constants are listed in the See Also section.
See Also:
setGradientReversed(boolean), DataviewConstants.GD_DOWN, DataviewConstants.GD_RADIAL, DataviewConstants.GD_RIGHT, DataviewConstants.GD_DIAGONAL_45, DataviewConstants.GD_DIAGONAL_135

getVisualEffects

public int getVisualEffects()
Gets the visual effects value for this SFX object.
Returns:
int representing the visual effects to apply to this subcomponent.

setVisualEffects

public void setVisualEffects(int vfx)
Sets the visual effects value for this SFX object.
Parameters:
vfx - int representing the visual effects to apply to this subcomponent.

getGradientStopColor

public java.awt.Color getGradientStopColor(int index)
Retrieves the color of a stop.
Specified by:
getGradientStopColor in interface oracle.dss.presutil.GradientSupport
Parameters:
index - The index of the stop whose color you want. The first stop is stop 0.
Returns:
The color of the specified stop.

setGradientStopColor

public void setGradientStopColor(java.awt.Color newColor,
                                 int index)
Specifies the color of a stop.
Specified by:
setGradientStopColor in interface oracle.dss.presutil.GradientSupport
Parameters:
newColor - The color for the stop.
index - The index of the stop whose color to set. The first stop is stop 0.

getGradientStopPosition

public double getGradientStopPosition(int index)
Retrieves position of a stop in the gradient of the gauge. The 0 position is at the start of the gradient. The 100 position is at the end of the gradient.

For example, if the gradient direction is GD_DOWN, and the position for stop 0 is 0, then the color for stop 0 appears at the top of the gradient. If the position for stop 1 is 50, then the color for stop 1 appears in the middle of the gradient. If the position for stop 2 is 100, then the color for stop 2 appears at the bottom of the gradient.

If GradientReversed is true, however, position 0 is at the end of the gradient, and position 100 is at the start.

Specified by:
getGradientStopPosition in interface oracle.dss.presutil.GradientSupport
Parameters:
index - The index of this stop.
Returns:
The position of the stop in the gradient. Valid values are from 0 - 100.

setGradientStopPosition

public void setGradientStopPosition(double newPos,
                                    int index)
Sets the position of a stop in a gradient. The 0 position is at the start of the gradient. The 100 position is at the end of the gradient. For example, if the gradient direction is GD_DOWN, and the position for stop 0 is 0, then the color for stop 0 appears at the top of the gradient. If the position for stop 1 is 50, then the color for stop 1 appears in the middle of the gradient. If the position for stop 2 is 100, then the color for stop 2 appears at the bottom of the gradient.

If GradientReversed is true, however, position 0 is at the end of the gradient, and position 100 is at the start.

Specified by:
setGradientStopPosition in interface oracle.dss.presutil.GradientSupport
Parameters:
index - The index of the stop whose position to set.
newPos - The position of the specified stop in the gradient. Valid values are from 0 - 100.

getGradientNumStops

public int getGradientNumStops()
Retrieves the number of stops in the gradient. A stop represents a color in the gradient.
Specified by:
getGradientNumStops in interface oracle.dss.presutil.GradientSupport
Returns:
The number of stops in the gradient.

setGradientNumStops

public void setGradientNumStops(int numStops)
Specifies the number of stops in the gradient of the gauge. Each stop represents a color in the gradient.

Whenever you call this method, the gauge positions stops equidistant from each other, with the first and the last stops at the extreme edges. The stops are repositioned without regard for their current position.

Specified by:
setGradientNumStops in interface oracle.dss.presutil.GradientSupport
Parameters:
numStops - The number of stops in the gradient of the gauge.

isGradientReversed

public boolean isGradientReversed()
Indicates whether the gradient direction is reversed. When the gradient direction is reversed, the gradient starts with the last stop and ends with stop 0.

Reversing the gradient direction increases the number of possible directions. For example, reversing the direction of GD_DOWN produces a gradient that goes up.

Returns:
boolean true if the direction is reversed, false if it is not.

setGradientReversed

public void setGradientReversed(boolean reverse)
Specifies whether to reverse the gradient direction. When the gradient direction is reversed, the gradient starts with the last stop and ends with stop 0.

This method provides opposite directions for the available gradient directions except GD_RADIAL. For example, to have a gradient go up, set the gradient type to GaugeConstants.GD_DOWN, and then pass true to this method.

Specified by:
setGradientReversed in interface oracle.dss.presutil.GradientSupport
Parameters:
reverse - true to reverse the direction of the gradient, false to use the GradientDirection property value as is.
See Also:
setGradientDirection(int)

convertGradientFillTypeToInt

public static int convertGradientFillTypeToInt(java.lang.String type)
For internal use only. Application developers should not use this
Converts GradientFillType String constants to Integer constants. This is used by the gauge skinning.

convertGradientFillTypeToString

public static java.lang.String convertGradientFillTypeToString(int fillType)
Parameters:
fillType -
Returns:
string representation of the fillType
For internal use only. Application developers should not use this
Convert a gradient fillType to its string representation. Used for XML.

convertGradientDirectionToInt

public static int convertGradientDirectionToInt(java.lang.String dir)
For internal use only. Application developers should not use this
Converts GradientDirection String constants to Integer constants. This is used by the gauge skinning.

convertGradientDirectionToString

public static java.lang.String convertGradientDirectionToString(int direction)
Parameters:
direction - int gradient direction
Returns:
string representation of the gradient direction
For internal use only. Application developers should not use this
Convert a gradient direction to its string representation.

convertVisualEffectsToInt

public static int convertVisualEffectsToInt(java.lang.String vfxString)
For internal use only. Application developers should not use this
Converts VisualEffects String constants to Integer constants. This is used by the gauge skinning.

convertVisualEffectsToString

public static java.lang.String convertVisualEffectsToString(int vfx)
Parameters:
vfx - int
Returns:
string representation of the visual effects
For internal use only. Application developers should not use this
Convert a VisualEffects int to its string representation.

getComponentName

protected java.lang.String getComponentName()
Overrides:
getComponentName in class BaseComponentXML
For internal use only. Application developers should not use this
Retrieves the name of the title.

getGradientStopStyleXML

protected oracle.dss.util.xml.ObjectNode getGradientStopStyleXML(boolean allProperties,
                                                                 int stopIndex)
For internal use only. Application developers should not use this

getXML

protected oracle.dss.util.xml.ContainerNode getXML(boolean allProperties,
                                                   boolean allOverriddenProperties)
For internal use only. Application developers should not use this
Retrieves XML from this component

setXML

protected void setXML(oracle.dss.util.xml.ContainerNode node,
                      boolean allProperties)
For internal use only. Application developers should not use this
if allProperties is true, setXML else setStyleXML

getGradientCenter

protected java.awt.geom.Point2D getGradientCenter()
For internal use only. Application developers should not use this
Used for certain gradient directions such as GD_RADIAL_OFF_CENTER. Returns the location of the center of the gradient relative to the top left corner of the shape.

setGradientCenter

protected void setGradientCenter(java.awt.geom.Point2D point)
For internal use only. Application developers should not use this
Used when preparing the list of drawable objects, this stores the point from which the gradient propagates if not center. Note that this point is relative to the object's starting point, not its absolute position.

getAttributeMapNoDefault

protected java.util.HashMap getAttributeMapNoDefault()

getAttributeMap

protected java.util.HashMap getAttributeMap()

cloneDefaultMap

public static java.util.HashMap cloneDefaultMap()

Skip navigation links

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

E12063-01


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