|
Chart FX for Java 6.5 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SoftwareFX.ChartFX.ImageBorder
public final class ImageBorder
Provides access to the ImageBorder object.
Until the advent of the Internet as a viable development platform, desktop applications were developed with strict user interface guidelines. This put constraints on a developer's ability to let components integrate custom interfaces or designs that could jeopardize the application's accessibility.
Nevertheless, the Internet, and more specifically HTML, promoted a new breed of applications. Today, both desktop and browser-based applications must distinguish themselves with original designs and innovative user interfaces. In this regard, Chart FX has pioneered the charting industry by adding features and tools that help developers to integrate extraordinary charts in their desktop applications and web sites with minimal programming effort.
No other charting product provides the graphic pizzazz and innovative tools that Chart FX offers today. Charts now support features like smoothing, transparency, gradients, double-buffering repainting and many others. However, of all the features built into Chart FX geared to enhance the chart's presentation layer, none stand out more than Image Borders.
Creating the ImageBorder Object
In order to add a image border to your chart, you will need to create an instance of the ImageBorder object. Below are two ways to create and assign the same 'Emboss1' image border:
chart1.BorderObject = new ImageBorder(ImageBorderType.EMBOSS);
ImageBorder myBorder = new ImageBorder(ImageBorderType.EMBOSS);
chart1.setBorderObject(myBorder);
Please see the setType(int)
property for a complete list of the supported ImageBorder enumerations.
If your looking for the standard border designs, please refer to the DefaultBorder
Class
.
Constructor Summary | |
---|---|
ImageBorder()
|
|
ImageBorder(int type)
|
|
ImageBorder(int type,
java.awt.Color color)
|
|
ImageBorder(java.lang.String fileName)
|
Method Summary | |
---|---|
void |
draw(java.awt.Graphics2D graphics2D,
java.awt.Rectangle r,
java.awt.Color clrExternal)
Used to draw a Chart FX ImageBorder on a selected device context. |
java.awt.Color |
getColor()
Gets the Color. |
int |
getType()
Gets the Type. |
void |
setColor(java.awt.Color value)
Sets the color of the border for the selected ImageBorder. |
void |
setType(int value)
Used to set the type for an image border object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageBorder()
public ImageBorder(int type)
public ImageBorder(int type, java.awt.Color color)
public ImageBorder(java.lang.String fileName)
Method Detail |
---|
public void draw(java.awt.Graphics2D graphics2D, java.awt.Rectangle r, java.awt.Color clrExternal)
Used to draw a Chart FX ImageBorder on a selected device context.
This method allows you to draw an ImageBorder to a selected device context without ever assigning the ImageBorder object to a chart.
The setType(int)
property allows you to select on of the supported ChartFX ImageBorder styles.
graphics2D
- r
- A Rectangle object specifying the desired position and size of the border.clrExternal
- The external color for the border.setType(int)
,
setColor(java.awt.Color)
,
DefaultBorder.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color)
,
GradientBackground.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color)
,
DefaultBorder
,
GradientBackground
public java.awt.Color getColor()
Gets the Color. For more detail see setColor(java.awt.Color)
.
public int getType()
Gets the Type. For more detail see setType(int)
.
public void setColor(java.awt.Color value)
Sets the color of the border for the selected ImageBorder.
Not all ImageBorders have a outlining border to use this property. If the border does not include a border, the setting will have no effect.
This property may be assigned to the BorderObject or the ImageBorder Object created:
chart1.getBorderObject().setColor(java.awt.Color.red);
or
ImageBorder myBorder = new ImageBorder(ImageBorderType.COLONIAL);
myBorder.setColor(java.awt.Color.red);
The Chart FX ImageBorders use shading to give a multidimensional effect. The ChartCore.setPageColor(java.awt.Color)
property can be used to modify the background color of the shaded area around ImageBorders.
For more information regarding the Color type, please refer to the Java API Documentation.
Here is an example of the 'Colonial' ImageBorder with the border color turned to red:
ChartCore.setBorderObject(SoftwareFX.ChartFX.IAdornment)
,
Chart
public void setType(int value)
Used to set the type for an image border object.
ImageBorderType :
Available ImageBorder types.Value | Description |
---|---|
ImageBorderType.EMBED | Embed |
ImageBorderType.EMBOSS | Emboss |
ImageBorderType.ARCH | Arch |
ImageBorderType.ARCH_THICK | ArchThick |
ImageBorderType.ARCH_STROKE | ArchStroke |
ImageBorderType.ARCH_STROKE_THICK | ArchStrokeThick |
ImageBorderType.SOLID | Solid |
ImageBorderType.SOLID_RIVET | SolidRivet |
ImageBorderType.SOLID_LINES | SolidLines |
ImageBorderType.SOLID_LINES_RIVET | SolidLinesRivet |
ImageBorderType.OPEN | Open |
ImageBorderType.OPEN_RIVET | OpenRivet |
ImageBorderType.OPEN_LINES | OpenLines |
ImageBorderType.OPEN_LINES_RIVET | OpenLinesRivet |
ImageBorderType.COLONIAL | Colonial |
ImageBorderType.SLIDE | Slide |
ImageBorderType.ROUNDED | Rounded |
ImageBorderType.ROUNDED_CAPTION | RoundedCaption |
ImageBorderType.ROUNDED_SHADOW | RoundedShadow |
ImageBorderType.ROUNDED_CAPTION_SHADOW | RoundedCaptionShadow |
ImageBorderType.AQUA | Aqua |
ImageBorderType.BUTTERFLY | Butterfly |
ImageBorderType.GEL | Gel |
ImageBorderType.MUSEUM | Museum |
ImageBorderType.PULSAR | Pulsar |
Once you create the image border object, you may assign attributes to the object with the supported ImageBorder properties.
After you have assigned all desired attributes to the image border object, you may set the object to the chart using the ChartCore.setBorderObject(SoftwareFX.ChartFX.IAdornment)
property.
ChartCore.setBorderObject(SoftwareFX.ChartFX.IAdornment)
,
setColor(java.awt.Color)
,
Chart
,
DefaultBorder
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |