Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.graph
Class SFX

oracle.dss.graph.SFX

public class SFX

Allows you to apply attributes for special effects to the graph. You can use special effects on the graph components that have a getSFX method, such as the PlotArea, the LegendArea, and the GraphBackground.


Method Summary
 int getFillType()
          Retrieves the fill type for the graph, such as color, gradient, and texture.
 int getGradientDirection()
          Retrieves the gradient direction for the graph.
 int getGradientNumPins()
          Deprecated. As of 2.8.0.10, replaced by getGradientNumStops().
 int getGradientNumStops()
          Retrieves the number of stops in the gradient.
 java.awt.Color getGradientPinLeftColor(int pinIndex)
          Deprecated. As of 2.8.0.10, replaced by getGradientStopColor(int).
 double getGradientPinPosition(int pinIndex)
          Deprecated. As of 2.8.0.10, replaced by getGradientStopPosition(int).
 java.awt.Color getGradientPinRightColor(int pinIndex)
          Deprecated. As of 2.8.0.10, replaced by getGradientStopColor(int).
 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 graph.
 java.lang.String getTexture()
          Retrieves either the URL of the file that contains the texture graphic that is displayed in the graph, or the name of the texture Image, depending on the method that was used to specify the texture.
 int getTextureDisplayMode()
          Retrieves the way that texture is displayed in the graph.
 boolean isGradientReversed()
          Indicates whether the gradient direction is reversed.
 void setFillType(int type)
          Specifies the fill type for the graph, such as color, gradient, and texture.
 void setGradientDirection(int dir)
          Specifies the gradient direction for the graph.
 void setGradientNumPins(int numPins)
          Deprecated. As of 2.8.0.10, replaced by setGradientNumStops(int).
 void setGradientNumStops(int numStops)
          Specifies the number of stops in the gradient of the graph.
 void setGradientPinLeftColor(java.awt.Color newColor, int pinIndex)
          Deprecated. As of 2.8.0.10, replaced by setGradientStopColor(java.awt.Color, int).
 void setGradientPinPosition(double newPos, int pinIndex)
          Deprecated. As of 2.8.0.10, replaced by setGradientStopPosition(double, int)
 void setGradientPinRightColor(java.awt.Color newColor, int pinIndex)
          Deprecated. As of 2.8.0.10, replaced by setGradientStopColor(java.awt.Color, int).
 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 setTextureDisplayMode(int mode)
          Specifies the way that texture is displayed in the graph.
 void setTextureImage(java.lang.String imageName, java.awt.Image image)
          Specifies an image to display as a texture in a graph.
 void setTextureURL(java.lang.String url)
          Specifies a graphic file to display as a texture in a graph.

 

Method Detail

getFillType

public int getFillType()
Retrieves the fill type for the graph, such as color, gradient, and texture.
Returns:
A constant that represents the fill type for the graph. Possible constants are listed in the See Also section.
See Also:
BaseGraphComponent.FT_COLOR, BaseGraphComponent.FT_GRADIENT, BaseGraphComponent.FT_TEXTURE

setFillType

public void setFillType(int type)
Specifies the fill type for the graph, such as color, gradient, and texture.

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

If you set the FillType to BaseGraphComponent.FT_TEXTURE, then you must specify an image to use as the texture, either by calling setTextureURL or setTextureImage.

Parameters:
type - A constant that represents the fill type for the graph. Valid constants are listed in the See Also section.
See Also:
BaseGraphComponent.FT_COLOR, BaseGraphComponent.FT_GRADIENT, BaseGraphComponent.FT_TEXTURE

getGradientDirection

public int getGradientDirection()
Retrieves the gradient direction for the graph. 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.

Returns:
A constant that represents the gradient direction for the graph. Possible constants are listed in the See Also section.
See Also:
BaseGraphComponent.GD_DOWN, BaseGraphComponent.GD_RADIAL, BaseGraphComponent.GD_RIGHT, BaseGraphComponent.GD_DIAGONAL_45, BaseGraphComponent.GD_DIAGONAL_135

setGradientDirection

public void setGradientDirection(int dir)
Specifies the gradient direction for the graph. 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.

Parameters:
dir - A constant that represents the gradient direction for the graph. Valid constants are listed in the See Also section.
See Also:
BaseGraphComponent.GD_DOWN, BaseGraphComponent.GD_RADIAL, BaseGraphComponent.GD_RIGHT, BaseGraphComponent.GD_DIAGONAL_45, BaseGraphComponent.GD_DIAGONAL_135

getGradientNumPins

public int getGradientNumPins()
Deprecated. As of 2.8.0.10, replaced by getGradientNumStops().
Retrieves the number of pins in the gradient of the graph.
Returns:
The number of pins in the gradient of the graph.

setGradientNumPins

public void setGradientNumPins(int numPins)
Deprecated. As of 2.8.0.10, replaced by setGradientNumStops(int).
Specifies the number of pins in the gradient of the graph.
Parameters:
numPins - The number of pins in the gradient of the graph.

getGradientPinPosition

public double getGradientPinPosition(int pinIndex)
Deprecated. As of 2.8.0.10, replaced by getGradientStopPosition(int).
Retrieves the position of this pin in the gradient of the graph. The values for index range from zero to the number of pins in the gradient.
Parameters:
pinIndex - The index of this pin.
Returns:
The position of the pin in the gradient of the graph.

setGradientPinPosition

public void setGradientPinPosition(double newPos,
                                   int pinIndex)
Deprecated. As of 2.8.0.10, replaced by setGradientStopPosition(double, int)
Sets the index and position of this pin in the gradient of the graph. The values for index range from zero to the number of pins in the gradient.
Parameters:
pinIndex - The index of this pin.
newPos - The position of the pin in the gradient of the graph.

getGradientPinLeftColor

public java.awt.Color getGradientPinLeftColor(int pinIndex)
Deprecated. As of 2.8.0.10, replaced by getGradientStopColor(int).
Retrieves the left color of this pin.
Parameters:
pinIndex - The index of this pin.
Returns:
The left color of this pin.

setGradientPinLeftColor

public void setGradientPinLeftColor(java.awt.Color newColor,
                                    int pinIndex)
Deprecated. As of 2.8.0.10, replaced by setGradientStopColor(java.awt.Color, int).
Specifies the left color of this pin. The left color refers to the color that starts at the left-most area of the pin.
Parameters:
newColor - The left color of this pin.
pinIndex - The index of this pin.

getGradientPinRightColor

public java.awt.Color getGradientPinRightColor(int pinIndex)
Deprecated. As of 2.8.0.10, replaced by getGradientStopColor(int).
Retrieves the right color of this pin. The right color refers to the color that starts at the right-most area of the pin.
Parameters:
pinIndex - The index of this pin.
Returns:
The right color of this pin.

setGradientPinRightColor

public void setGradientPinRightColor(java.awt.Color newColor,
                                     int pinIndex)
Deprecated. As of 2.8.0.10, replaced by setGradientStopColor(java.awt.Color, int).
Specifies the right color of this pin. The right color refers to the color that starts at the right-most area of the pin.
Parameters:
newColor - The right color of this pin.
pinIndex - The index of this pin.

getGradientStopColor

public java.awt.Color getGradientStopColor(int index)
Retrieves the color of a stop.
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.
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 graph. 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.

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.

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.
Returns:
The number of stops in the gradient.

setGradientNumStops

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

Whenever you call this method, the graph 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.

Parameters:
numStops - The number of stops in the gradient of the graph.

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 BaseGraphComponent.GD_DOWN, and then pass true to this method.

Parameters:
reverse - true to reverse the direction of the gradient, false to use the GradientDirection property value as is.
See Also:
setGradientDirection(int)

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 doubles the possible directions. For example, reversing the direction of GD_DOWN produces a gradient that goes up.

Parameters:
reverse - true if the direction is reversed, false if it is not.

getTextureDisplayMode

public int getTextureDisplayMode()
Retrieves the way that texture is displayed in the graph. The texture graphic is either stretched or tiled to fit the area that it is displayed in.
Returns:
A constant that represents the way that texture is displayed in the graph. Valid constants are listed in the See Also section.
See Also:
BaseGraphComponent.TDM_TILED, BaseGraphComponent.TDM_STRETCHED

setTextureDisplayMode

public void setTextureDisplayMode(int mode)
Specifies the way that texture is displayed in the graph. The texture graphic is either stretched or tiled to fit the area that it is displayed in.
Parameters:
mode - A constant that represents the the way that texture is display in the graph. Valid constants are listed in the See Also section.
See Also:
BaseGraphComponent.TDM_TILED, BaseGraphComponent.TDM_STRETCHED

getTexture

public java.lang.String getTexture()
Retrieves either the URL of the file that contains the texture graphic that is displayed in the graph, or the name of the texture Image, depending on the method that was used to specify the texture. If the setTextureURL method was used to specify the texture, then this method's return value will be the URL of the file that contains the texture graphic. If the setTextureImage method was used to specify the texture, then this method's return value will be the name of the texture graphic itself.
Returns:
Either the URL of the file that contains the texture graphic, or the name of the texture Image, depending on the method that was used to set the texture.
See Also:
setTextureURL(java.lang.String), setTextureImage(java.lang.String, java.awt.Image)

setTextureURL

public void setTextureURL(java.lang.String url)
Specifies a graphic file to display as a texture in a graph. The specified graphic is displayed only when the FillType property is set to FT_TEXTURE.
Parameters:
url - The URL for the file that contains the texture graphic that is displayed in the graph. If the URL does not point to a graphic file, then a runtime exception is thrown, and the graph is not displayed.
See Also:
setFillType(int), setTextureDisplayMode(int)

setTextureImage

public void setTextureImage(java.lang.String imageName,
                            java.awt.Image image)
Specifies an image to display as a texture in a graph. The specified image is displayed only when the FillType property is set to FT_TEXTURE.

The image that you set in this method is not stored with the XML for the graph. You must arrange for the image to be available to the deployed graph. You should call this method after you set XML on the graph.

Parameters:
imageName - A name for the Image.
image - The Image to display as a texture.
See Also:
setFillType(int), setTextureDisplayMode(int)

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.