1 package jimm.datavision.gui.cmd; 2 import jimm.datavision.Section; 3 import jimm.util.I18N; 4 5 10 public class SectionPageBreakCommand extends CommandAdapter { 11 12 protected Section section; 13 14 public SectionPageBreakCommand(Section section) { 15 super(I18N.get(section.hasPageBreak() 16 ? "SectionPageBreakCommand.off_name" 17 : "SectionPageBreakCommand.on_name")); 18 this.section = section; 19 } 20 21 public void perform() { 22 boolean newState = !section.hasPageBreak(); 23 section.setPageBreak(newState); 24 } 25 26 public void undo() { 27 perform(); 28 } 29 30 } 31 | Popular Tags |