hep.aida.ref.plotter
Class BaseStyle

java.lang.Object
  extended by hep.aida.ref.plotter.WeakStyleListener
      extended by hep.aida.ref.plotter.BaseStyle
All Implemented Interfaces:
IBaseStyle, StyleListener
Direct Known Subclasses:
AxisStyle, BoxStyle, DataStyle, FillStyle, InfoStyle, LegendBoxStyle, LineStyle, MarkerStyle, PlotterStyle, StatisticsBoxStyle, TextStyle, TitleStyle

public abstract class BaseStyle
extends WeakStyleListener
implements IBaseStyle


Method Summary
 void addParent(IBaseStyle style)
           
 void addParentList(List pl)
           
 String[] availableParameterOptions(String parameterName)
          Below are the AIDA methods.
 String[] availableParameters()
          Get list of the available parameters (implementation-dependent)
 IBaseStyle child(String name)
           
 IBaseStyle[] children()
           
 AbstractStyleParameter deepestSetParameter(String parameterName)
           
 boolean isMyParent(IBaseStyle style)
           
 boolean isParameterSet(String parameterName)
           
 boolean isParameterSet(String parameterName, boolean recursive)
           
 boolean isVisible()
          Get isVisible of the data.
 String name()
          Get the name of this BaseStyle.
 AbstractStyleParameter parameter(String parName)
           
 String parameterValue(String parameterName)
          Get value of a parameter.
 List parentList()
          Get the parent for this BaseStyle.
 void removeAllParents()
          Remove all parents and all the parents' parents
 void removeParent(IBaseStyle style)
          This method removes one parent and all its children (recursively).
 void reset()
          Return to original (construction time) state.
 boolean setParameter(String parameterName)
          Set a parameter.
 boolean setParameter(String parameterName, String parValue)
          Set a parameter.
 boolean setParameter(String parameterName, String parValue, String[] parAllowedValues)
           
 void setParameterDefault(String parameterName, String parDefaultValue)
           
 void setParent(IBaseStyle style)
          Set the parent for this BaseStyle.
 void setParentList(List list)
          First remove current parents (if present), then add new parents from the list.
 boolean setVisible(boolean visible)
          Set isVisible of the data.
 void styleChanged(BaseStyle style)
          Notify the listeners that the style has changed.
 Class type()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

name

public String name()
Get the name of this BaseStyle.

Specified by:
name in interface IBaseStyle
Returns:
The name of the BaseStyle.

type

public Class type()
Specified by:
type in interface IBaseStyle
Returns:
The type of the style.

child

public IBaseStyle child(String name)
Specified by:
child in interface IBaseStyle
Returns:
A sub style, knowing its name.

children

public IBaseStyle[] children()
Specified by:
children in interface IBaseStyle
Returns:
The array of sub styles.

setVisible

public boolean setVisible(boolean visible)
Set isVisible of the data.

Specified by:
setVisible in interface IBaseStyle

isVisible

public boolean isVisible()
Get isVisible of the data. return The isVisible of the data.

Specified by:
isVisible in interface IBaseStyle

setParent

public void setParent(IBaseStyle style)
Set the parent for this BaseStyle.

Parameters:
style - The parent for this BaseStyle.

setParentList

public void setParentList(List list)
First remove current parents (if present), then add new parents from the list. If list == null || list.size() == 0, just remove current parents.


removeAllParents

public void removeAllParents()
Remove all parents and all the parents' parents


removeParent

public void removeParent(IBaseStyle style)
This method removes one parent and all its children (recursively). To remove all parents use setParentList(null)


addParent

public void addParent(IBaseStyle style)

addParentList

public void addParentList(List pl)

isMyParent

public boolean isMyParent(IBaseStyle style)

parentList

public List parentList()
Get the parent for this BaseStyle.

Returns:
The parent.

parameter

public AbstractStyleParameter parameter(String parName)

deepestSetParameter

public AbstractStyleParameter deepestSetParameter(String parameterName)

isParameterSet

public boolean isParameterSet(String parameterName)

isParameterSet

public boolean isParameterSet(String parameterName,
                              boolean recursive)

availableParameterOptions

public String[] availableParameterOptions(String parameterName)
Below are the AIDA methods.

Specified by:
availableParameterOptions in interface IBaseStyle

availableParameters

public String[] availableParameters()
Description copied from interface: IBaseStyle
Get list of the available parameters (implementation-dependent)

Specified by:
availableParameters in interface IBaseStyle

parameterValue

public String parameterValue(String parameterName)
Description copied from interface: IBaseStyle
Get value of a parameter.

Specified by:
parameterValue in interface IBaseStyle
Returns:
the value.

reset

public void reset()
Description copied from interface: IBaseStyle
Return to original (construction time) state. Explicitly set parameters will be set to defaults and may be overridden

Specified by:
reset in interface IBaseStyle

setParameter

public boolean setParameter(String parameterName)
Description copied from interface: IBaseStyle
Set a parameter.

Specified by:
setParameter in interface IBaseStyle
Parameters:
parameterName - Name of the parameter.
Returns:
false if parameter (or its options) unknown or invalid.

setParameter

public boolean setParameter(String parameterName,
                            String parValue)
Description copied from interface: IBaseStyle
Set a parameter.

Specified by:
setParameter in interface IBaseStyle
Parameters:
parameterName - Name of the parameter.
parValue - string of options.
Returns:
false if parameter (or its options) unknown or invalid.

setParameter

public boolean setParameter(String parameterName,
                            String parValue,
                            String[] parAllowedValues)

setParameterDefault

public void setParameterDefault(String parameterName,
                                String parDefaultValue)

styleChanged

public void styleChanged(BaseStyle style)
Notify the listeners that the style has changed.

Specified by:
styleChanged in interface StyleListener
Specified by:
styleChanged in class WeakStyleListener


jHepWork 3.2 © jWork.org