|
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.DefaultBorder
public final class DefaultBorder
Provides access to the DefautBorder object.
Until the advent of the Internet as a viable development platform, desktop applications were developed with strict user interface guidelines. Borders contained in these in these applications allow end users become familiar with a product quickly and prove that 'new and flashy' is not always the preferred design to gain popularity.
The default borders are consistent with the standards used to develop applications and give your charting applications a very familiar look and feel. Many end-users are more comfortable using applications on a client/server level that follow these standard user interface guidelines.
Creating the DefaultBorder Object
In order to add a default border to your chart, you will need to create an instance of the DefaultBorder object. Below are two ways to create and assign the same 'Bump' default border:
chart1.setBorderObject(new DefaultBorder(BorderType.BUMP));
DefaultBorder myBorder = new DefaultBorder(BorderType.BUMP);
chart1.setBorderObject (myBorder);
Please see the setType(int)
property for a complete list of the supported DefaultBorder enumerations.
Note: If you are looking for more sophisticated border designs for your charts, Chart FX introduces ImageBorders. ImageBorders allows developers to add graphic pizzazz to charting applications, for more information please see the supported members of the ImageBorder
Class
.
Constructor Summary | |
---|---|
DefaultBorder()
|
|
DefaultBorder(int type)
|
|
DefaultBorder(int type,
java.awt.Color clr)
|
Method Summary | |
---|---|
void |
draw(java.awt.Graphics2D graphics2D,
java.awt.Rectangle r,
java.awt.Color clrExternal)
Used to draw a Chart FX DefaultBorder on a selected device context. |
java.awt.Color |
getColor()
Gets the Color. |
int |
getType()
Gets the Type. |
boolean |
isInternalOpposite()
Gets the InternalOpposite. |
void |
setColor(java.awt.Color value)
Sets the color of the border for a selected DefaultBorder. |
void |
setInternalOpposite(boolean value)
Sets the internal tool borders opposite of the configured default border when present. |
void |
setType(int value)
Used to set the type for a default border object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultBorder()
public DefaultBorder(int type, java.awt.Color clr)
public DefaultBorder(int type)
Method Detail |
---|
public void draw(java.awt.Graphics2D graphics2D, java.awt.Rectangle r, java.awt.Color clrExternal)
Used to draw a Chart FX DefaultBorder on a selected device context.
This method allows you to draw a DefaultBorder to a selected device context without ever assigning the DefaultBorder object to a chart.
The setType(int)
property allows you to select on of the supported ChartFX DefaultBorder 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)
,
GradientBackground.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color)
,
ImageBorder.draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color)
,
GradientBackground
,
ImageBorder
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 boolean isInternalOpposite()
Gets the InternalOpposite. For more detail see setInternalOpposite(boolean)
.
public void setColor(java.awt.Color value)
Sets the color of the border for a selected DefaultBorder.
Not all DefaultBorders have a outlining border to use this property. If there is not a border, the color assignment will have no effect.
This property may be assigned to the BorderObject or the DefaultBorder Object created:
chart1.getBorderObject().setColor(java.awt.Color.red);
or
DefaultBorder myBorder = new DefaultBorder(BorderType.RAISED);
myBorder.setColor(java.awt.Color.red);
For more information regarding the Color type, please refer to the Java API Documentation.
Here is an example of the 'Raised' DefaultBorder with the border color turned to red:
ChartCore.setBorderObject(SoftwareFX.ChartFX.IAdornment)
,
Chart
public void setInternalOpposite(boolean value)
Sets the internal tool borders opposite of the configured default border when present.
If a chart is using an internal border for a legendbox object and the default border is set to raised, setting this property to True will cause the internal border to be sunken. (Configures the internal tool border to the opposite border type)
LegendBoxBase.setToolBorder(int)
,
LegendBox
public void setType(int value)
Used to set the type for a default border object.
BorderType :
Available DefaultBorder types.Value | Description |
---|---|
BorderType.NONE | No border |
BorderType.COLOR | Color Border |
BorderType.DARK | Dark Border |
BorderType.LIGHT | Light Border |
BorderType.SUNKEN_OUTER | SunkenOuter Border |
BorderType.SUNKEN_INNER | SunkenInner Border |
BorderType.RAISED_OUTER | RaisedOuter Border |
BorderType.RAISED_INNER | RaisedInner Border |
BorderType.RAISED | Raised Border |
BorderType.ETCHED | Etched Border |
BorderType.BUMP | Bump Border |
BorderType.SUNKEN | Sunken Border |
Once you create the default border object, you may assign attributes to the object with the supported DefaultBorder properties.
After you have assigned all desired attributes to the default border object, you may set the object to the chart using the ChartCore.setBorderObject(SoftwareFX.ChartFX.IAdornment)
property.
ChartCore.setBorderObject(SoftwareFX.ChartFX.IAdornment)
,
Chart
,
ImageBorder
|
http://www.softwarefx.com | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |