hep.aida.ref.plotter
Class BaseStyle
- java.lang.Object
-
- hep.aida.ref.plotter.WeakStyleListener
-
- 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddParent(IBaseStyle style)voidaddParentList(java.util.List pl)java.lang.String[]availableParameterOptions(java.lang.String parameterName)Below are the AIDA methods.java.lang.String[]availableParameters()Get list of the available parameters (implementation-dependent)IBaseStylechild(java.lang.String name)IBaseStyle[]children()AbstractStyleParameterdeepestSetParameter(java.lang.String parameterName)booleanisMyParent(IBaseStyle style)booleanisParameterSet(java.lang.String parameterName)booleanisParameterSet(java.lang.String parameterName, boolean recursive)booleanisVisible()Get isVisible of the data.java.lang.Stringname()Get the name of this BaseStyle.AbstractStyleParameterparameter(java.lang.String parName)java.lang.StringparameterValue(java.lang.String parameterName)Get value of a parameter.java.util.ListparentList()Get the parent for this BaseStyle.voidremoveAllParents()Remove all parents and all the parents' parentsvoidremoveParent(IBaseStyle style)This method removes one parent and all its children (recursively).voidreset()Return to original (construction time) state.booleansetParameter(java.lang.String parameterName)Set a parameter.booleansetParameter(java.lang.String parameterName, java.lang.String parValue)Set a parameter.booleansetParameter(java.lang.String parameterName, java.lang.String parValue, java.lang.String[] parAllowedValues)voidsetParameterDefault(java.lang.String parameterName, java.lang.String parDefaultValue)voidsetParent(IBaseStyle style)Set the parent for this BaseStyle.voidsetParentList(java.util.List list)First remove current parents (if present), then add new parents from the list.booleansetVisible(boolean visible)Set isVisible of the data.voidstyleChanged(BaseStyle style)Notify the listeners that the style has changed.java.lang.Classtype()
-
-
-
Method Detail
-
name
public java.lang.String name()
Get the name of this BaseStyle.- Specified by:
namein interfaceIBaseStyle- Returns:
- The name of the BaseStyle.
-
type
public java.lang.Class type()
- Specified by:
typein interfaceIBaseStyle- Returns:
- The type of the style.
-
child
public IBaseStyle child(java.lang.String name)
- Specified by:
childin interfaceIBaseStyle- Returns:
- A sub style, knowing its name.
-
children
public IBaseStyle[] children()
- Specified by:
childrenin interfaceIBaseStyle- Returns:
- The array of sub styles.
-
setVisible
public boolean setVisible(boolean visible)
Set isVisible of the data.- Specified by:
setVisiblein interfaceIBaseStyle
-
isVisible
public boolean isVisible()
Get isVisible of the data. return The isVisible of the data.- Specified by:
isVisiblein interfaceIBaseStyle
-
setParent
public void setParent(IBaseStyle style)
Set the parent for this BaseStyle.- Parameters:
style- The parent for this BaseStyle.
-
setParentList
public void setParentList(java.util.List list)
First remove current parents (if present), then add new parents from the list. Iflist == 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 usesetParentList(null)
-
addParent
public void addParent(IBaseStyle style)
-
addParentList
public void addParentList(java.util.List pl)
-
isMyParent
public boolean isMyParent(IBaseStyle style)
-
parentList
public java.util.List parentList()
Get the parent for this BaseStyle.- Returns:
- The parent.
-
parameter
public AbstractStyleParameter parameter(java.lang.String parName)
-
deepestSetParameter
public AbstractStyleParameter deepestSetParameter(java.lang.String parameterName)
-
isParameterSet
public boolean isParameterSet(java.lang.String parameterName)
-
isParameterSet
public boolean isParameterSet(java.lang.String parameterName, boolean recursive)
-
availableParameterOptions
public java.lang.String[] availableParameterOptions(java.lang.String parameterName)
Below are the AIDA methods.- Specified by:
availableParameterOptionsin interfaceIBaseStyle
-
availableParameters
public java.lang.String[] availableParameters()
Description copied from interface:IBaseStyleGet list of the available parameters (implementation-dependent)- Specified by:
availableParametersin interfaceIBaseStyle
-
parameterValue
public java.lang.String parameterValue(java.lang.String parameterName)
Description copied from interface:IBaseStyleGet value of a parameter.- Specified by:
parameterValuein interfaceIBaseStyle- Returns:
- the value.
-
reset
public void reset()
Description copied from interface:IBaseStyleReturn to original (construction time) state. Explicitly set parameters will be set to defaults and may be overridden- Specified by:
resetin interfaceIBaseStyle
-
setParameter
public boolean setParameter(java.lang.String parameterName)
Description copied from interface:IBaseStyleSet a parameter.- Specified by:
setParameterin interfaceIBaseStyle- Parameters:
parameterName- Name of the parameter.- Returns:
- false if parameter (or its options) unknown or invalid.
-
setParameter
public boolean setParameter(java.lang.String parameterName, java.lang.String parValue)Description copied from interface:IBaseStyleSet a parameter.- Specified by:
setParameterin interfaceIBaseStyle- Parameters:
parameterName- Name of the parameter.parValue- string of options.- Returns:
- false if parameter (or its options) unknown or invalid.
-
setParameter
public boolean setParameter(java.lang.String parameterName, java.lang.String parValue, java.lang.String[] parAllowedValues)
-
setParameterDefault
public void setParameterDefault(java.lang.String parameterName, java.lang.String parDefaultValue)
-
styleChanged
public void styleChanged(BaseStyle style)
Notify the listeners that the style has changed.- Specified by:
styleChangedin interfaceStyleListener- Specified by:
styleChangedin classWeakStyleListener
-
-
DMelt 3.0 © DataMelt by jWork.ORG