package hep.aida.ref.plotter.style.editor;
import java.awt.Color;
import org.freehep.swing.ColorConverter;
public class StylePropertyState {
Class type = null;
int currentIndex = -1;
int defaultIndex = -1;
Object currentValue = null;
Object defaultValue = null;
Object[] values = null;
StylePropertyState() {}
StylePropertyState(Object cv, Object[] st) {
currentValue = cv;
values = st;
setIndex();
}
StylePropertyState(int ci, Object cv, Object[] st) {
this(ci, cv, st, -1, null);
}
StylePropertyState(int ci, Object cv, Object[] st, int di, Object dv) {
this(ci, cv, st, di, dv, null);
}
StylePropertyState(int ci, Object cv, Object[] st, int di, Object dv, Class t) {
type = t;
currentIndex = ci;
defaultIndex = di;
currentValue = cv;
defaultValue = dv;
values = st;
}
StylePropertyState(StylePropertyState state) {
type = state.type;
currentIndex = state.currentIndex;
defaultIndex = state.defaultIndex;
currentValue = state.currentValue;
defaultValue = state.defaultValue;
values = state.values;
}
void setIndex() {
int ci = -1;
int di = -1;
if (values != null && values.length > 0) {
for (int i=0; i
Ads help maintain this website.