public String getType() { final SequenceEncoder se = new SequenceEncoder(';'); se.append(ID) .append((KeyStroke) trailKeyInput.getValue()) .append(mc.getValueString()) .append(iv.getValueString()) .append(gv.getValueString()) .append(cr.getValueString()) .append(fc.getValueString()) .append(lc.getValueString()) .append(st.getValueString()) .append(ut.getValueString()) .append(pb.getValueString()) .append(db.getValueString()) .append(lw.getValueString()); return se.getValue(); }
public String getState() { return String.valueOf(gv.booleanValue().booleanValue()); }
public Ed(Footprint p) { controls = new JPanel(); controls.setLayout(new BoxLayout(controls, BoxLayout.Y_AXIS)); Box b; trailKeyInput = new HotKeyConfigurer(null, "Key Command: ", p.trailKey); controls.add(trailKeyInput.getControls()); mc = new StringConfigurer(null, "Menu Command: ", p.menuCommand); controls.add(mc.getControls()); iv = new BooleanConfigurer(null, "Trails start visible?", Boolean.valueOf(p.initiallyVisible)); controls.add(iv.getControls()); gv = new BooleanConfigurer( null, "Trails are visible to all players?", Boolean.valueOf(p.globallyVisible)); controls.add(gv.getControls()); cr = new IntConfigurer(null, "Circle Radius: ", new Integer(p.circleRadius)); controls.add(cr.getControls()); fc = new ColorConfigurer(null, "Circle Fill Color: ", p.fillColor); controls.add(fc.getControls()); lc = new ColorConfigurer(null, "Line Color: ", p.lineColor); controls.add(lc.getControls()); lw = new DoubleConfigurer(null, "Line thickness: ", new Double(p.lineWidth)); controls.add(lw.getControls()); st = new IntConfigurer( null, "Selected Unit Trail Transparency (0-100): ", new Integer(p.selectedTransparency)); controls.add(st.getControls()); ut = new IntConfigurer( null, "Unselected Unit Trail Transparency (0-100): ", new Integer(p.unSelectedTransparency)); controls.add(ut.getControls()); b = Box.createHorizontalBox(); pb = new IntConfigurer( null, "Display Trail Points Off-map for ", new Integer(p.edgePointBuffer)); b.add(pb.getControls()); b.add(new JLabel("pixels")); controls.add(b); b = Box.createHorizontalBox(); db = new IntConfigurer(null, "Display Trails Off-map for ", new Integer(p.edgeDisplayBuffer)); b.add(db.getControls()); b.add(new JLabel("pixels")); controls.add(b); }