com.sas.graphics.components
Class Graph

com.sas.graphics.components.Graph
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
BarChart, BarLineChart, GanttChart, LineChart, LinePlot, PieChart, RadarChart, ScatterPlot, TileChart, WaterfallChart

public abstract class Graph

The Graph class is an abstract class that serves as a general base class for all specific chart and plot classes (such as BarChart and PieChart) to extend.

Usage

This class is used to set non-specific graph properties such as an optional header and/or footer for the graph. These are any JComponent to be placed at the extreme top (header) or bottom (footer) of the Graph's display area (which remains inside the area affected by the GraphModel so it will have a consistent background if the header or footer is transparent).

Simple text based information would be better set as titles and footnotes, which is extended by the specific models.

In addition, Graph is where data tips can be set up.

Most specific, visual, user set-able properties are consolidated in the GraphModel, accessible from the Graph.

Behavior

Graph supports a common set of properties used by all charts and plots. For our usage here the terms "chart" refers to a graph that can summarise (apply a statistic) to its data while the term "plot" refers to graphs that never Summarise data.

Since:
SAS 9.1
See Also:
GraphModel, Serialized Form

Field Summary
protected  javax.swing.JComponent footnoteContainer
           
static java.lang.String RB_KEY
           
protected  javax.swing.JComponent titleContainer
           
 
Constructor Summary
Graph()
          Construct a Graph.
 
Method Summary
 void addActionListener(GraphActionListener l)
           
 void addMouseListener(java.awt.event.MouseListener l)
           
 void addMouseMotionListener(java.awt.event.MouseMotionListener l)
           
 void addMouseMotionListener(java.awt.event.MouseWheelListener l)
           
 void applyColorScheme(ColorScheme scheme)
          Apply a color scheme on this Graph.
protected abstract  void applyDataModel()
          Intended for internalUse only
protected  void applyGraphModel()
          Intended for internalUse only
 void applyGraphStyle(GraphStyle graphStyle)
          applyGraphStyle must be called in order for any visual attributes set within the graph's GraphStyle to show up in the graph.
 void clearSelection()
           
protected  void firePropertyChange(java.lang.String propertyName, ModelBase oldValue, ModelBase newValue)
          Support for reporting bound contained-Model property changes.
 SwingActionProvider getActionProvider()
          Returns the ActionProvider object used to return actions for the Graph.
 int getAppliedColorSchemeName()
          The name of the last ColorScheme applied to this graph.
 int getAppliedGraphStyleName()
          The name of the last graphStyle applied to this graph.
 java.awt.Color getBackground()
           
 java.awt.Rectangle getBrushBounds()
           
protected  com.sas.graphics.util.gl.Channel getChannel()
           
protected  com.sas.collection.ContentsChangedListener getContentsChangedListener()
          Internal use only
protected  GraphStyle getDefaultGraphStyle()
          For internal use only.
static int getDefaultHeight()
           
static int getDefaultWidth()
           
 int getDisplayPolicy()
          Get how the graph is to utilize the display area when insufficient space is available.
 javax.swing.JComponent getFooter()
          Return the user-set footer component, or null if none has been specified.
 NoteModel getFootnote(int position)
          Return the model for the footnote at the specified position.
 NoteModel getFootnote1()
          Return the model for the graph's 1st (upper most) footnote.
 NoteModel getFootnote2()
          Return the model for the graph's 2nd footnote.
 javax.swing.JComponent getHeader()
          Return the user-set header component, or null if none has been specified.
protected  javax.swing.event.ListSelectionListener getListSelectionListener()
          Internal use only
 java.util.Locale getLocale()
           
 com.sas.graphics.components.MessageModel getMessageModel()
          Sets the model that can be used to specify a message that will be displayed in a panel in the graph area appearing on top of the graph display.
 java.awt.Dimension getMinimumSize()
           
 java.awt.Dimension getPreferredSize()
           
protected  javax.swing.event.TableModelListener getTableModelListener()
          Internal use only
 NoteModel getTitle(int position)
          Return the model for the title at the specified position.
 NoteModel getTitle1()
          Return the model for the graph's 1st (upper most) title.
 NoteModel getTitle2()
          Return the model for the graph's 2nd title.
 NoteModel getTitle3()
          Return the model for the graph's 3rd title.
 NoteModel getTitle4()
          Return the model for the graph's 4th title.
 boolean isAppliedGraphStyleModified()
          Indicates whether or not any display properties have changes since the last graphstyle was applied.
abstract  boolean isAutoRepaintEnabled()
          Returns whether or not the graph automatically repaints when any of its properties (contained in associated models GraphModel, DataModel, NoteModel, etc) has changed.
 void paint(java.awt.Graphics g)
           
 void paintAll(java.awt.Graphics g)
           
protected  void paintBackground(java.awt.Graphics g, java.awt.Rectangle bounds, java.awt.Insets insets)
           
 PickInfo pick(int x, int y)
           
 PickInfo[] pick(int x, int y, int w, int h)
           
 PickInfo[] pickSelected()
           
abstract  void prepareToPaint()
          Notify this component that an application is about to call paint directly.
 void removeActionListener(GraphActionListener l)
           
 PickInfo select(int x, int y)
           
 PickInfo select(int x, int y, boolean isControlDown)
           
 PickInfo[] select(int x, int y, int w, int h)
           
 PickInfo[] select(int x, int y, int w, int h, boolean isControlDown)
           
protected abstract  void selectionChanged()
          Internal use only.
 void setActionProvider(SwingActionProvider actionProvider)
          Set an action provider on this Graph.
abstract  void setAutoRepaintEnabled(boolean enabled)
          Sets whether or not the graph automatically repaints when any of its properties (contained in associated models GraphModel, DataModel, NoteModel, etc) has changed.
 void setBackground(java.awt.Color c)
           
 void setBounds(int x, int y, int w, int h)
           
 void setDisplayPolicy(int newDisplayPolicy)
          Set how the graph is to utilize the display area.
 void setFooter(javax.swing.JComponent newFooter)
          Assigns a component that gets placed at the bottom of the Graph display area.
 void setFootnote(NoteModel newNoteModel, int position)
          Set the model for the footnote at the specified position.
 void setFootnote1(NoteModel newNoteModel)
          Set the model for the graph's 1st (upper most) footnote.
 void setFootnote2(NoteModel newNoteModel)
          Set the model for the graph's 2nd footnote.
 void setHeader(javax.swing.JComponent newHeader)
          Assigns a component that gets placed at the top of the Graph component's display area.
 void setMessageModel(com.sas.graphics.components.MessageModel newMessageModel)
          Sets the model that can be used to specify a message that will be displayed in a panel in the graph area appearing on top of the graph display.
protected  void setPaintContext(boolean redoSelectionOnPaintEnabled, com.sas.graphics.components.animation.AnimationPosition animationPosition)
           
 void setTitle(NoteModel newNoteModel, int position)
          Set the model for the title at the specified position.
 void setTitle1(NoteModel newNoteModel)
          Set the model for the graph's 1st title.
 void setTitle2(NoteModel newNoteModel)
          Set the model for the graph's 2nd title.
 void setTitle3(NoteModel newNoteModel)
          Set the model for the graph's 3rd title.
 void setTitle4(NoteModel newNoteModel)
          Set the model for the graph's 4th title.
 void update(java.awt.Graphics g)
           
protected abstract  void updateDataModelListeners()
          Invoked when the data model has changed.
protected  void updateDataModelListeners(java.lang.Object newModel, java.lang.Object newSelectionModel)
          Perform listener list maintenance on a data and selection model.
protected  void validateTree()
           
 

Field Detail

RB_KEY

public static final java.lang.String RB_KEY
See Also:
Constant Field Values

titleContainer

protected transient javax.swing.JComponent titleContainer

footnoteContainer

protected transient javax.swing.JComponent footnoteContainer
Constructor Detail

Graph

public Graph()
Construct a Graph.

Method Detail

getListSelectionListener

protected javax.swing.event.ListSelectionListener getListSelectionListener()
Internal use only


getTableModelListener

protected javax.swing.event.TableModelListener getTableModelListener()
Internal use only


getContentsChangedListener

protected com.sas.collection.ContentsChangedListener getContentsChangedListener()
Internal use only


setActionProvider

public void setActionProvider(SwingActionProvider actionProvider)
Set an action provider on this Graph.

Parameters:
actionProvider -

getActionProvider

public SwingActionProvider getActionProvider()
Returns the ActionProvider object used to return actions for the Graph.


getDefaultGraphStyle

protected final GraphStyle getDefaultGraphStyle()
For internal use only.


firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  ModelBase oldValue,
                                  ModelBase newValue)
Support for reporting bound contained-Model property changes. This method can be called when a bound property has changed and it will send the appropriate PropertyChangeEvent to any registered PropertyChangeListeners.

Parameters:
propertyName - the property being changed
oldValue - the value being changed from
newValue - the value being changed to

getDefaultWidth

public static int getDefaultWidth()

getDefaultHeight

public static int getDefaultHeight()

setPaintContext

protected void setPaintContext(boolean redoSelectionOnPaintEnabled,
                               com.sas.graphics.components.animation.AnimationPosition animationPosition)

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class javax.swing.JComponent

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

update

public void update(java.awt.Graphics g)
Overrides:
update in class javax.swing.JComponent

validateTree

protected void validateTree()
Overrides:
validateTree in class java.awt.Container

paintAll

public void paintAll(java.awt.Graphics g)
Overrides:
paintAll in class java.awt.Component

paint

public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent

prepareToPaint

public abstract void prepareToPaint()
Notify this component that an application is about to call paint directly. This method is useful when attempting to get the Graph to draw into an image (or other application provided GraphicsContext).

As per java standard practices; "paint" should never be called directly by an application. However if it is necessary to render the Graph directly then the use of paintAll(Graphics) or printAll(Graphics) is acceptable.

Graphs asynchronously update to keep their view in sync with their model properties (Graphmodel, DataModel, NoteModel etc.). A direct call to paintAll or printAll does not allow for the graph to asynchronously sync up with their model proeprties. prepareToPaint provides this synchronization point necessary for the Graphs to update their component structure as needed.

Note: Used in a headless environment, Graphs will never asynchronously update and therefore require a call to prepareToPaint to render into a GraphicsContext.

The headless and non-headless cases can be handled slightly differently. In the non-headless case the asynchronous updating needs to be halted. This is done by setting the "autoRepaintEnabled" property to false. The default for autoRepaintEnabled is true, allowing the graph to automatically resync and repaint as model properties are modified.

Example writing to an image. Note for readability exception handling has been ignored.

 static public void main(String args[])
 {
    BufferedImage bi = new BufferedImage(640,480,BufferedImage.TYPE_INT_RGB);
    Graphics ig = bi.createGraphics();

    // Create Graph
    BarChart graph = new BarChart();
 
    // This call is not necessary if you are running in a headless environment.
    graph.setAutoRepaintEnabled(false);
    
    // ... assign data and model properties here ...
    graph.setDataModel(newGraphData());
    
    {// Render sequence
        graph.setBounds(0,0,bi.getWidth(null),bi.getHeight(null)); // Define the size of the Graph
        graph.addNotify(); // Makes the component displayable.
        graph.prepareToPaint(); // do property synchronization
        graph.paintAll(ig); // render into some graphics context
    }
 
    // Dispose of image graphics context
    ig.dispose();                
    
    // Save immage to disk
    File file = new File("graph.jpg");
    try
    {
        ImageIO.write(bi, "jpg", file);
    }
    catch (IOException e)
    {
        System.out.println("ImageIO.write failed.");
    }
 }
 


setAutoRepaintEnabled

public abstract void setAutoRepaintEnabled(boolean enabled)
Sets whether or not the graph automatically repaints when any of its properties (contained in associated models GraphModel, DataModel, NoteModel, etc) has changed. The default value is true.

The setting of this property to false implies that the application will be responsible for synchronising the graph with its models using the prepareToPaint() method. Also see isAutoRepaintEnabled() on the graph's model.

This method was added to support rendering into an off screen graphics context such as an image.

Parameters:
enabled - true means to automatically update

isAutoRepaintEnabled

public abstract boolean isAutoRepaintEnabled()
Returns whether or not the graph automatically repaints when any of its properties (contained in associated models GraphModel, DataModel, NoteModel, etc) has changed.


setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Overrides:
setBounds in class java.awt.Component

setBackground

public void setBackground(java.awt.Color c)
Overrides:
setBackground in class javax.swing.JComponent

getBackground

public java.awt.Color getBackground()
Overrides:
getBackground in class java.awt.Component

setMessageModel

public void setMessageModel(com.sas.graphics.components.MessageModel newMessageModel)
                     throws java.lang.IllegalArgumentException
Sets the model that can be used to specify a message that will be displayed in a panel in the graph area appearing on top of the graph display. This is not intended for frequent use but rather is a mechanism that may allow an the graph to present a more integrated look with the calling application in situations where the application needs to present some information about a specific graph of via a specific graph to the user. Different types of messages are supported allowing the application to qualify the type of message that is presented to their user (warning message, error message, information message...)

And though this model may not be set to null, no message is displayed so long as the message title property is null and the message strings are not defined or all null.

Note: no other behaviour or visual differences are modified by the graph when a message is displayed. The application is responsible for specifying any special display properties on the graph required to produce the desired appearance since it is probable that different applications may wish to present different looks based upon their usage.

Throws:
java.lang.IllegalArgumentException
See Also:
getMessageModel()

getMessageModel

public com.sas.graphics.components.MessageModel getMessageModel()
Sets the model that can be used to specify a message that will be displayed in a panel in the graph area appearing on top of the graph display.

See Also:
setMessageModel(com.sas.graphics.components.MessageModel)

applyGraphModel

protected void applyGraphModel()
Intended for internalUse only


applyDataModel

protected abstract void applyDataModel()
Intended for internalUse only


getLocale

public java.util.Locale getLocale()
Overrides:
getLocale in class java.awt.Component

selectionChanged

protected abstract void selectionChanged()
Internal use only. Invoked when the selection has changed.


updateDataModelListeners

protected abstract void updateDataModelListeners()
Invoked when the data model has changed. All data model listeners should be updated. The utility method updateDataModelListeners(Object, Object) can be used to maintain the listener lists for a graph using one data model and one or zero selection models. Graphs that use more than one data model should override updateDataModelListeners() and maintain the listener lists for the models.

See Also:
updateDataModelListeners(Object model, Object selectionModel)

updateDataModelListeners

protected void updateDataModelListeners(java.lang.Object newModel,
                                        java.lang.Object newSelectionModel)
Perform listener list maintenance on a data and selection model. The previously set model's listeners list are updated as well as the new models given as arguments. Graphs that

Parameters:
newModel - - One of TableModel, ContentsChangedSource, null
newSelectionModel - - ListSelectionModel, or null

paintBackground

protected void paintBackground(java.awt.Graphics g,
                               java.awt.Rectangle bounds,
                               java.awt.Insets insets)

setDisplayPolicy

public void setDisplayPolicy(int newDisplayPolicy)
                      throws java.lang.IllegalArgumentException
Set how the graph is to utilize the display area. The graph will always utilize all the display area supplied to it however there are occasions when the display area provided to the graph is less than optimal size to draw the graph well. Various factors can contribute to this including font selection, data assignments, number of data observations, the type of graph, whether or not legends are displayed, etc.

On the occasion when insufficient display area is available, the graph has to decide whether to use scroll bars and only display a portion of the graph or to draw the entire graph into the available space (shrinking and adjusting portions of the graph as best it can).

To allow scroll bars use the GraphConstants.DISPLAY_SCROLL_AS_NEEDED or specify GraphConstants.DISPLAY_FIT_TO_SCREEN to force the entire graph into the available display area. Specify GraphConstants.DISPLAY_SCROLL_ENABLED shows zoom scrollbars which appear when the display area is moused over and the chart is forced to show the entire graph in the available display area, however the use can then zoom and scroll to investigate the data further.

The default value is GraphConstants.DISPLAY_AUTOMATIC. Valid values are:
GraphConstants.DISPLAY_FIT_TO_SCREEN GraphConstants.DISPLAY_SCROLL_AS_NEEDED GraphConstants.DISPLAY_SCROLL_ENABLED: GraphConstants.DISPLAY_AUTOMATIC:

Parameters:
newDisplayPolicy - how the Graph should utilize the dislay area
Throws:
java.lang.IllegalArgumentException - if newDisplayPolicy is invalid.
See Also:
getDisplayPolicy()

getDisplayPolicy

public int getDisplayPolicy()
Get how the graph is to utilize the display area when insufficient space is available. The graph will always utilize all the display area supplied to it however there are occasions when the display area provided to the graph is less than optimal size to draw the graph well. Various factors can contribute to this including font selection, data assignments, number of data observations, the type of graph, whether or not legends are displayed, etc. On the occasion when insufficient display area is available, the graph has to decide whether to use scroll bars and only display a portion of the graph or to draw the entire graph into the available space (shrinking and adjusting portions of the graph as best it can). To allow scroll bars use the GraphConstants.DISPLAY_SCROLL_AS_NEEDED or specify GraphConstants.DISPLAY_FIT_TO_SCREEN to force the entire graph into the available display area.

Valid values are:
GraphConstants.DISPLAY_SCROLL_ENABLED GraphConstants.DISPLAY_FIT_TO_SCREEN GraphConstants.DISPLAY_SCROLL_AS_NEEDED

Returns:
how the Graph should utilize the display area when insufficient space is available
See Also:
setDisplayPolicy(int)

setHeader

public void setHeader(javax.swing.JComponent newHeader)
Assigns a component that gets placed at the top of the Graph component's display area. The component specified will be inside the Graph's display area, and will share the GraphStyle of the Graph. So if the component is transparent, consistent background image can show through.

Parameters:
newHeader - the component to be placed at the top of the graph

Note: a null value will cause the component (if any) to be removed.

See Also:
getHeader()

getHeader

public javax.swing.JComponent getHeader()
Return the user-set header component, or null if none has been specified.

See Also:
setHeader(javax.swing.JComponent)

setFooter

public void setFooter(javax.swing.JComponent newFooter)
Assigns a component that gets placed at the bottom of the Graph display area. The component specified will be inside the Graph's display area, and will share the GraphStyle of the Graph. So if the component is transparent, consistent background image can show through.

Parameters:
newFooter - the component to be placed at the bottom of the graph

Note: a null value will cause the component (if any) to be removed.

See Also:
getFooter()

getFooter

public javax.swing.JComponent getFooter()
Return the user-set footer component, or null if none has been specified.

See Also:
setFooter(javax.swing.JComponent)

pick

public PickInfo pick(int x,
                     int y)

pick

public PickInfo[] pick(int x,
                       int y,
                       int w,
                       int h)

select

public PickInfo select(int x,
                       int y)

select

public PickInfo[] select(int x,
                         int y,
                         int w,
                         int h)

select

public PickInfo select(int x,
                       int y,
                       boolean isControlDown)

select

public PickInfo[] select(int x,
                         int y,
                         int w,
                         int h,
                         boolean isControlDown)

clearSelection

public void clearSelection()

pickSelected

public PickInfo[] pickSelected()

getBrushBounds

public java.awt.Rectangle getBrushBounds()

addMouseListener

public void addMouseListener(java.awt.event.MouseListener l)
Overrides:
addMouseListener in class java.awt.Component

addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseMotionListener l)
Overrides:
addMouseMotionListener in class java.awt.Component

addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseWheelListener l)

addActionListener

public void addActionListener(GraphActionListener l)

removeActionListener

public void removeActionListener(GraphActionListener l)

setTitle

public void setTitle(NoteModel newNoteModel,
                     int position)
              throws java.lang.IllegalArgumentException
Set the model for the title at the specified position.

Parameters:
newNoteModel - - title attributes
position - identifies the desired title by its order position.
Throws:
java.lang.IllegalArgumentException - if newNoteModel is null.
java.lang.IllegalArgumentException - if the value of position is less than 1 or greater than 4.
See Also:
getTitle(int), setTitle1(com.sas.graphics.components.NoteModel), setTitle2(com.sas.graphics.components.NoteModel), setTitle3(com.sas.graphics.components.NoteModel), setTitle4(com.sas.graphics.components.NoteModel), NoteModel, NoteModel.apply(com.sas.graphics.components.NoteModel)

getTitle

public NoteModel getTitle(int position)
                   throws java.lang.IllegalArgumentException
Return the model for the title at the specified position.

Parameters:
position - identifies the desired title by its order position.
Returns:
NoteModel that contains the text attributes.
Throws:
java.lang.IllegalArgumentException - if the value of position is less than 1 or greater than 4.
See Also:
setTitle(com.sas.graphics.components.NoteModel, int), getTitle1(), getTitle2(), getTitle3(), getTitle4(), NoteModel

setTitle1

public void setTitle1(NoteModel newNoteModel)
               throws java.lang.IllegalArgumentException
Set the model for the graph's 1st title.

Parameters:
newNoteModel - the 1st title's attributes
Throws:
java.lang.IllegalArgumentException - if newNoteModel is null.
See Also:
getTitle1(), setTitle(com.sas.graphics.components.NoteModel, int), NoteModel

getTitle1

public NoteModel getTitle1()
Return the model for the graph's 1st (upper most) title.

Returns:
NoteModel that contains the text attributes.
See Also:
setTitle1(com.sas.graphics.components.NoteModel), getTitle(int), JComponent

setTitle2

public void setTitle2(NoteModel newNoteModel)
               throws java.lang.IllegalArgumentException
Set the model for the graph's 2nd title.

Parameters:
newNoteModel - the 2nd title's attributes
Throws:
java.lang.IllegalArgumentException - if newNoteModel is null.
See Also:
getTitle2(), setTitle(com.sas.graphics.components.NoteModel, int), NoteModel

getTitle2

public NoteModel getTitle2()
Return the model for the graph's 2nd title.

Returns:
NoteModel that contains the text attributes.
See Also:
setTitle2(com.sas.graphics.components.NoteModel), getTitle(int), JComponent

setTitle3

public void setTitle3(NoteModel newNoteModel)
               throws java.lang.IllegalArgumentException
Set the model for the graph's 3rd title.

Parameters:
newNoteModel - the 3rd title's attributes
Throws:
java.lang.IllegalArgumentException - if newNoteModel is null.
See Also:
getTitle3(), setTitle(com.sas.graphics.components.NoteModel, int), NoteModel

getTitle3

public NoteModel getTitle3()
Return the model for the graph's 3rd title.

Returns:
NoteModel that contains the text attributes.
See Also:
setTitle3(com.sas.graphics.components.NoteModel), getTitle(int), JComponent

setTitle4

public void setTitle4(NoteModel newNoteModel)
               throws java.lang.IllegalArgumentException
Set the model for the graph's 4th title.

Parameters:
newNoteModel - the 4th title's attributes
Throws:
java.lang.IllegalArgumentException - if newNoteModel is null.
See Also:
getTitle4(), setTitle(com.sas.graphics.components.NoteModel, int), NoteModel

getTitle4

public NoteModel getTitle4()
Return the model for the graph's 4th title.

Returns:
NoteModel that contains the text attributes.
See Also:
setTitle4(com.sas.graphics.components.NoteModel), getTitle(int), JComponent

setFootnote

public void setFootnote(NoteModel newNoteModel,
                        int position)
                 throws java.lang.IllegalArgumentException
Set the model for the footnote at the specified position.

Parameters:
newNoteModel - footnote attributes
position - identifies the desired footnote by its order position.
Throws:
java.lang.IllegalArgumentException - if newNoteModel is null.
java.lang.IllegalArgumentException - if the value of position is less than 1 or greater than 2.
See Also:
getFootnote(int), setFootnote1(com.sas.graphics.components.NoteModel), setFootnote2(com.sas.graphics.components.NoteModel), NoteModel, NoteModel.apply(com.sas.graphics.components.NoteModel)

getFootnote

public NoteModel getFootnote(int position)
                      throws java.lang.IllegalArgumentException
Return the model for the footnote at the specified position.

Parameters:
position - identifies the desired footnote by its order position.
Returns:
NoteModel that contains the text attributes.
Throws:
java.lang.IllegalArgumentException - if the value of position is less than 1 or greater than 2.
See Also:
setFootnote(com.sas.graphics.components.NoteModel, int), getFootnote1(), getFootnote2(), NoteModel

setFootnote1

public void setFootnote1(NoteModel newNoteModel)
                  throws java.lang.IllegalArgumentException
Set the model for the graph's 1st (upper most) footnote.

Parameters:
newNoteModel - the 1st footnote's attributes
Throws:
java.lang.IllegalArgumentException - if newNoteModel is null.
See Also:
getFootnote1(), setFootnote(com.sas.graphics.components.NoteModel, int), NoteModel

getFootnote1

public NoteModel getFootnote1()
Return the model for the graph's 1st (upper most) footnote.

Returns:
NoteModel that contains the text attributes.
See Also:
setFootnote1(com.sas.graphics.components.NoteModel), getFootnote(int), NoteModel

setFootnote2

public void setFootnote2(NoteModel newNoteModel)
                  throws java.lang.IllegalArgumentException
Set the model for the graph's 2nd footnote.

Parameters:
newNoteModel - the 2nd footnote's attributes
Throws:
java.lang.IllegalArgumentException - if newNoteModel is null.
See Also:
getFootnote2(), setFootnote(com.sas.graphics.components.NoteModel, int), NoteModel

getFootnote2

public NoteModel getFootnote2()
Return the model for the graph's 2nd footnote.

Returns:
NoteModel that contains the text attributes.
See Also:
setFootnote2(com.sas.graphics.components.NoteModel), getFootnote(int), NoteModel

getAppliedGraphStyleName

public int getAppliedGraphStyleName()
The name of the last graphStyle applied to this graph. Intended for internal use.

See Also:
applyGraphStyle(com.sas.graphics.components.GraphStyle), isAppliedGraphStyleModified()

isAppliedGraphStyleModified

public boolean isAppliedGraphStyleModified()
Indicates whether or not any display properties have changes since the last graphstyle was applied. Note: the appliedGraphStyleName property is only modified when a graph style is applied. The appliedGraphStyleModified property is set to false when a graph style is applied and set to true when display property changes are detected.

Intended for internal use.

See Also:
applyGraphStyle(com.sas.graphics.components.GraphStyle), getAppliedGraphStyleName()

getAppliedColorSchemeName

public int getAppliedColorSchemeName()
The name of the last ColorScheme applied to this graph. Intended for internal use.

See Also:
applyColorScheme(com.sas.graphics.components.ColorScheme)

applyGraphStyle

public void applyGraphStyle(GraphStyle graphStyle)
applyGraphStyle must be called in order for any visual attributes set within the graph's GraphStyle to show up in the graph.

Note: calling this method, wipes out any previously defined same visual attributes set on an individual graph. Any further customisation of the graph needs to happen after the applyGraphStyle method call.

Parameters:
graphStyle - containing a set of visual attributes for the charts.

applyColorScheme

public void applyColorScheme(ColorScheme scheme)
Apply a color scheme on this Graph.

Parameters:
scheme - a ColorScheme containing a set of colors for the charts.

getChannel

protected com.sas.graphics.util.gl.Channel getChannel()



Copyright © 2009 SAS Institute Inc. All Rights Reserved.