...
Code Block |
---|
public interface IStyleRule {
// Possible types of Style Rules
static int CLASS = 0; // Class of the object: hep.aida.IHistogram1D
static int PATH = 1; // Position of the object in a Tree
static int ORDER = 2; // Order in the IPlotterRegion: specific number, or cyclical
static int ATTRIBUTE = 3; // Arbitrary "key=value" pair, evalyated by the Rule
// From AIDA object's annotation any entry with "plotterState." prefix in key
// will be stripped of this prefix and put into PlotterState with ATTRIBUTE
// type before obtaining Style from the StyleRegistry
static int ACTION = 4; // What is going to happen with the object: plotting, printing
static int CATEGORY = 5; // "experiment=GLAST", "quality=preliminary"
// ACTION seems like a sub-type of CATEGORY: "printing=true"
// Operations that chain rules together
static int OR = 0;
static int AND = 1;
int getType();
/**
* Priority determines the order in which corresponding IPlotterStyle
* should be used when assembling the cumulative IPlotterStyle
*/
int getPriority();
// Should have some conventions for describing Rules (XML-based ?)
String getDescription();
// Manage Rule Chaining
void addRule(IStyleRule rule, int operation);
int getNRules();
int getRuleOperation(int n);
IStyleRule getRule(int n);
void removeRule(int n);
// Evaluates the Rule, including all added Rules
boolean ruleApplies(IPlotterState state);
}
|
...