Chart FX for Java 6.5

SoftwareFX.ChartFX
Class DefaultBorder

java.lang.Object
  extended by SoftwareFX.ChartFX.DefaultBorder
All Implemented Interfaces:
IAdornment

public final class DefaultBorder
extends java.lang.Object
implements IAdornment

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

DefaultBorder

public DefaultBorder()

DefaultBorder

public DefaultBorder(int type,
                     java.awt.Color clr)

DefaultBorder

public DefaultBorder(int type)
Method Detail

draw

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.

Remarks:
  • 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.

  • Parameters:
    graphics2D -
    r - A Rectangle object specifying the desired position and size of the border.
    clrExternal - The external color for the border.
    See Also:
    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

    getColor

    public java.awt.Color getColor()

    Gets the Color. For more detail see setColor(java.awt.Color).


    getType

    public int getType()

    Gets the Type. For more detail see setType(int).


    isInternalOpposite

    public boolean isInternalOpposite()

    Gets the InternalOpposite. For more detail see setInternalOpposite(boolean).


    setColor

    public void setColor(java.awt.Color value)

    Sets the color of the border for a selected DefaultBorder.

    Remarks:
  • 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:

  • See Also:
    ChartCore.setBorderObject(SoftwareFX.ChartFX.IAdornment), Chart

    setInternalOpposite

    public void setInternalOpposite(boolean value)

    Sets the internal tool borders opposite of the configured default border when present.

    Remarks:
  • 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)

  • See Also:
    LegendBoxBase.setToolBorder(int), LegendBox

    setType

    public void setType(int value)

    Used to set the type for a default border object.

    Values:
    BorderType : Available DefaultBorder types.
    ValueDescription
    BorderType.NONENo border
    BorderType.COLORColor Border
    BorderType.DARKDark Border
    BorderType.LIGHTLight Border
    BorderType.SUNKEN_OUTERSunkenOuter Border
    BorderType.SUNKEN_INNERSunkenInner Border
    BorderType.RAISED_OUTERRaisedOuter Border
    BorderType.RAISED_INNERRaisedInner Border
    BorderType.RAISEDRaised Border
    BorderType.ETCHEDEtched Border
    BorderType.BUMPBump Border
    BorderType.SUNKENSunken Border

    Remarks:
  • 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.

  • See Also:
    ChartCore.setBorderObject(SoftwareFX.ChartFX.IAdornment), Chart, ImageBorder

    http://www.softwarefx.com

    2007 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
    All other names are trademarks or registered trademarks of their respective owners.