//if (_originalYTicks != null) {
// _narrowQuery.setBoolean("ylog", false);
// _narrowQuery.setEnabled("ylog", false);
//}
// Attach listeners.
_wideQuery.addQueryListener(new QueryListener() {
public void changed(String name) {
if (name.equals("title")) {
_plot.setTitle(_wideQuery.getStringValue("title"));
} else if (name.equals("xlabel")) {
_plot.setXLabel(_wideQuery.getStringValue("xlabel"));
} else if (name.equals("ylabel")) {
_plot.setYLabel(_wideQuery.getStringValue("ylabel"));
} else if (name.equals("xrange")) {
_plot
.read("XRange: "
+ _wideQuery.getStringValue("xrange"));
} else if (name.equals("xticks")) {
String spec = _wideQuery.getStringValue("xticks").trim();
_plot.read("XTicks: " + spec);
// FIXME: log axis format temporarily
// disabled, see above.
// if (spec.equals("")) {
// _narrowQuery.setEnabled("xlog", true);
// } else {
// _narrowQuery.setBoolean("xlog", false);
// _narrowQuery.setEnabled("xlog", false);
// }
} else if (name.equals("yticks")) {
String spec = _wideQuery.getStringValue("yticks").trim();
_plot.read("YTicks: " + spec);
// FIXME: log axis format temporarily
// disabled, see above.
// if (spec.equals("")) {
// _narrowQuery.setEnabled("ylog", true);
// } else {
// _narrowQuery.setBoolean("ylog", false);
// _narrowQuery.setEnabled("ylog", false);
// }
} else if (name.equals("yrange")) {
_plot
.read("YRange: "
+ _wideQuery.getStringValue("yrange"));
} else if (name.equals("marks")) {
((Plot) _plot).setMarksStyle(_wideQuery
.getStringValue("marks"));
}
_plot.repaint();
}
});
_narrowQuery.addQueryListener(new QueryListener() {
public void changed(String name) {
if (name.equals("grid")) {
_plot.setGrid(_narrowQuery.getBooleanValue("grid"));
} else if (name.equals("stems")) {
((Plot) _plot).setImpulses(_narrowQuery