/** * Saves the current diagram. * * @param askName should name be asked if already known */ public void saveCurrent(boolean askName) { DiagramPane pane = getCurrentDiagram(); if (pane == null) { return; } pane.saveDiagram(askName); contentChanged(pane); }
@Override /** {@inheritDoc} */ protected void contentChanged(DiagramPane pane) { if (pane == null) { updateMenus(false); saveItem.setEnabled(false); container.updateToolBar(null); } else { saveItem.setEnabled(!pane.isSaved()); numberingItem.setState(pane.getOptions().isNumberingEnabled()); updateMenus(true); OrderingLevel level = pane.getOptions().getOrderingLevel(); orderingOffItem.setState(level == OrderingLevel.OFF); orderingOverlapItem.setState(level == OrderingLevel.SUPPRESS_OVERLAP); container.updateToolBar(pane); } }
public void publishCurrent() { DiagramPane pane = getCurrentDiagram(); if (pane == null) return; DiagramPublisher publisher = new DiagramPublisher(); publisher.setXMLData(pane.getXMLData()); HTMLProducer producer = pane.getImageMaker(); try { publisher.setImageData(producer.getRawData("PNG")); } catch (Exception ex) { // TODO: Proceed this exception } publisher.setHTMLData(producer.renderHTMLWrapper()); publisher.setCallback(container); if (container.getServerURL() != null) { InteropUtils.setAccessURL(container.getServerURL()); } publisher.publish(); }
public void actionPerformed(ActionEvent e) { DiagramPane pane = getCurrentDiagram(); pane.getOptions().invertNumbering(); }
public void actionPerformed(ActionEvent e) { DiagramPane pane = getCurrentDiagram(); pane.getLinkController().getGroupHandler().displayManagerDialog(MasterView.this); }