All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.graphics.components
Class LineStyle

    com.sas.graphics.components.LineStyle

Direct Known Subclasses:
  StrokeLineStyle

    public class LineStyle

Attributes that affect the appearance of solid lines. The LineStyle class encapsulates the set of user specifiable properties pertaining to solid-only lines like frames, tick marks and most outlines. Attributes included are: color, visibility, thickness.

## Usage

     BarChart barChart = new BarChart(new BarChartTableDataModel(someTableModel));
     LineStyle lineStyle = barChart.getGraphModel().getCategoryAxisModel().getAxisLineStyle()
     lineStyle.setColor(Color.blue.darker());

## Behavior

This class comes with an apply() method which accepts as a parameter an object of the same class and applies the new settings to the object's attributes.

Since:
  SAS 9.1
See Also:
  `GraphStyle`, `ModelBase`

Constructor Summary
`LineStyle()`
`LineStyle(java.awt.Color newColor)`
`LineStyle(java.awt.Color newColor, com.sas.measures.BaseLength newThickness, int newVisibilityPolicy)`

Method Summary
`void` | `apply(LineStyle theOtherObject)` Utility method to convey properties contained in "theOtherObject" to this object.
`boolean` | `equals(java.lang.Object obj)` Determines whether another object is equal to this `LineStyle`.
`java.awt.Color` | `getColor()` Gets the line Color.
`com.sas.measures.BaseLength` | `getThickness()` Get line thickness.
`int` | `getVisibilityPolicy()` Returns the line's visibility policy which if automatic will vary by its use in the graph.
`int` | `hashCode()` Computes the hash code for this `LineStyle`.
`void` | `setColor(java.awt.Color newColor)` Set the line color.
`void` | `setThickness(com.sas.measures.BaseLength newThickness)` Set line thickness.
`void` | `setVisibilityPolicy(int newVisibilityPolicy)` Set the visibility policy which may be visible (GraphConstants.TRUE), not visible (GraphConstants.FALSE)or determined by the graph based upon state information (GraphConstants.AUTOMATIC).

Methods inherited from class com.sas.graphics.components.ModelBase
`addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, setContainedModel`

Constructor Detail

### LineStyle

    public LineStyle()

### LineStyle

    public LineStyle(java.awt.Color newColor)

### LineStyle

    public LineStyle(java.awt.Color newColor,
                     com.sas.measures.BaseLength newThickness,
                     int newVisibilityPolicy)

Method Detail

### apply

    public void apply(LineStyle theOtherObject)

  Utility method to convey properties contained in "theOtherObject" to this object.

  Note: Contained "models" (i.e. properties that are subclasses of ModelBase) will in turn be called on to convey their properties to the like contained models in the other object. In that respect this can be considered a "tree" type copy.

  Also Note: This is a deep copy. Thus after the copy, mutable properties will not be shared by the two instances.

  Parameters:
    `theOtherObject` - properties applied to this instance

### getColor

    public java.awt.Color getColor()

  Gets the line Color.

  Returns:
    line color
  See Also:
    `setColor(java.awt.Color)`

### setColor

    public void setColor(java.awt.Color newColor)
                  throws java.lang.IllegalArgumentException

  Set the line color.

  Parameters:
    `newColor` - the color to set on this line.
  Throws:
    `java.lang.IllegalArgumentException` - if newColor is null.
  See Also:
    `getColor()`

### setThickness

    public void setThickness(com.sas.measures.BaseLength newThickness)
                      throws java.lang.IllegalArgumentException

  Set line thickness.

  Parameters:
    `newThickness` - BaseLength containing line thickness.
  Throws:
    `java.lang.IllegalArgumentException` - if newThickness is null.
  See Also:
    `getThickness()`

### getThickness

    public com.sas.measures.BaseLength getThickness()

  Get line thickness.

  Returns:
    BaseLength containing line thickness
  See Also:
    `setThickness(com.sas.measures.BaseLength)`

### setVisibilityPolicy

    public void setVisibilityPolicy(int newVisibilityPolicy)
                             throws java.lang.IllegalArgumentException

  Set the visibility policy which may be visible (GraphConstants.TRUE), not visible (GraphConstants.FALSE)or determined by the graph based upon state information (GraphConstants.AUTOMATIC). valid `newVisibilityPolicy` values are:
  - GraphConstants.AUTOMATIC
  - GraphConstants.TRUE
  - GraphConstants.FALSE

  Parameters:
    `newVisibilityPolicy` - visibility of this line
  Throws:
    `java.lang.IllegalArgumentException` - is thrown if an invalid newVisibilityPolicy parameter is specified.
  See Also:
    `getVisibilityPolicy()`

### getVisibilityPolicy

    public int getVisibilityPolicy()

  Returns the line's visibility policy which if automatic will vary by its use in the graph.

  Returns:
    int if the visibility is on, off or automatically determined by the chart based upon state
  See Also:
    `setVisibilityPolicy(int)`

### equals

    public boolean equals(java.lang.Object obj)

  Determines whether another object is equal to this `LineStyle`.

  The result is `true` if and only if the argument is not `null` and is a `LineStyle` object that has the same property values as this object.

  Overrides:
    `equals` in class `ModelBase`
  Parameters:
    `obj` - the object to test for equality with this `LineStyle`
  Returns:
    `true` if the objects are the same; `false` otherwise.

### hashCode

    public int hashCode()

  Computes the hash code for this `LineStyle`.

  Overrides:
    `hashCode` in class `ModelBase`
  Returns:
    a hash code value for this object.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.