Chart FX 7 for Java Server

com.softwarefx.chartfx.server.adornments
Class SimpleBorder

java.lang.Object
  extended by com.softwarefx.chartfx.server.adornments.SimpleBorder
All Implemented Interfaces:
IBorderAdornment

public class SimpleBorder
extends Object
implements IBorderAdornment

Provides access to the SimpleBorder object.

Use the SimpleBorder's properties to configure the Border of the Chart, as well as the DockableBar.setBorder(com.softwarefx.chartfx.server.DockBorder) of the DockableBar such as the DataGrid,the LegendBox, or the ToolBar.

The following image shows a red SimpleBorder with a "Bump" effect around the chart. The DataGrid's border is blue with a "Sunken" effect and the LegendBox is white with an "Embed" effect.

Please see the setType(com.softwarefx.chartfx.server.adornments.SimpleBorderType) property for a complete list of the supported SimpleBorder types.

Important Note : To set the basic border of a chart in your applications, you must reference the Adornments assembly in your project.

If your looking for the graphical image borders, please refer to the ImageBorder Class .


Constructor Summary
SimpleBorder()
           
SimpleBorder(SimpleBorderType type)
           
SimpleBorder(SimpleBorderType type, Color clr)
           
 
Method Summary
 void draw(Graphics2D g, Rectangle r, Color clrExternal)
          Draws a Chart FX SimpleBorder on a selected device context.
 Color getColor()
          Gets the Color.
 SimpleBorderType getType()
          Gets the Type.
 boolean isInternalOpposite()
          Gets the InternalOpposite.
 void setColor(Color value)
          Sets the color of the border.
 void setInternalOpposite(boolean value)
          Sets the internal tool borders opposite of the configured default border when present.
 void setType(SimpleBorderType value)
          Sets the type of the Simple border object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleBorder

public SimpleBorder()

SimpleBorder

public SimpleBorder(SimpleBorderType type)

SimpleBorder

public SimpleBorder(SimpleBorderType type,
                    Color clr)
Method Detail

draw

public void draw(Graphics2D g,
                 Rectangle r,
                 Color clrExternal)

Draws a Chart FX SimpleBorder on a selected device context.

Remarks:
  • This method allows you to draw a SimpleBorder to a selected device context without ever assigning the SimpleBorder object to a chart.

  • The setType(com.softwarefx.chartfx.server.adornments.SimpleBorderType) property allows you to select on of the supported ChartFX SimpleBorder styles.

  • Parameters:
    g - A Graphics object is associated with a specific device context.
    r - A Rectangle object specifying the desired position and size of the border.
    clrExternal - The external color for the border.
    See Also:
    setType(com.softwarefx.chartfx.server.adornments.SimpleBorderType), 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, ImageBackground, SolidBackground

    getColor

    public Color getColor()

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

    Specified by:
    getColor in interface IBorderAdornment

    getType

    public SimpleBorderType getType()

    Gets the Type. For more detail see setType(com.softwarefx.chartfx.server.adornments.SimpleBorderType).


    isInternalOpposite

    public boolean isInternalOpposite()

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


    setColor

    public void setColor(Color value)

    Sets the color of the border.

    Remarks:
  • Not all SimpleBorders have a outlining border to use this property. If there is not a border, the color assignment will have no effect.

  • For more information regarding the Color type, please refer to the Java API Documentation.

  • Here is an example of the "Raised" SimpleBorder with the border color turned to red:

  • Specified by:
    setColor in interface IBorderAdornment
    See Also:
    Chart.setBorder(com.softwarefx.chartfx.server.adornments.IBorderAdornment), DockableBar.setBorder(com.softwarefx.chartfx.server.DockBorder), setType(com.softwarefx.chartfx.server.adornments.SimpleBorderType), draw(java.awt.Graphics2D, java.awt.Rectangle, java.awt.Color), Chart, DockableBar

    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 DockableBarobject and the basic border is set to raised, setting this property to True will cause the internal border to be sunken.

  • Below, InternalOpposite is set to true when the LegendBox and the Chart share the same border (RAISED):

    Similarly, InternalOpposite is set to false in the following screenshot:

  • See Also:
    Chart.setBorder(com.softwarefx.chartfx.server.adornments.IBorderAdornment), DockableBar.setBorder(com.softwarefx.chartfx.server.DockBorder), LegendBox, Chart

    setType

    public void setType(SimpleBorderType value)

    Sets the type of the Simple border object.

    Remarks:
  • Once you create the default border object, you may assign attributes to the object with the supported SimpleBorder properties.

  • See Also:
    setColor(java.awt.Color), setInternalOpposite(boolean), Chart.setBorder(com.softwarefx.chartfx.server.adornments.IBorderAdornment), DockableBar.setBorder(com.softwarefx.chartfx.server.DockBorder), Chart, DockableBar

    http://www.softwarefx.com

    2008 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.