private void addCreationButtonsTo(JToolBar tb, final DrawingEditor editor) { // AttributeKeys for the entitie sets HashMap<AttributeKey,Object> attributes; ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.samples.net.Labels"); ButtonFactory.addSelectionToolTo(tb, editor); tb.addSeparator(); attributes = new HashMap<AttributeKey,Object>(); attributes.put(AttributeKeys.FILL_COLOR, Color.white); attributes.put(AttributeKeys.STROKE_COLOR, Color.black); attributes.put(AttributeKeys.TEXT_COLOR, Color.black); ButtonFactory.addToolTo(tb, editor, new TextCreationTool(new NodeFigure(), attributes), "edit.createNode", labels); attributes = new HashMap<AttributeKey,Object>(); attributes.put(AttributeKeys.STROKE_COLOR, new Color(0x000099)); ButtonFactory.addToolTo(tb, editor, new ConnectionTool(new LineConnectionFigure(), attributes), "edit.createLink", labels); }
private void addCreationButtonsTo(JToolBar tb, final DrawingEditor editor) { // AttributeKeys for the entitie sets HashMap<AttributeKey, Object> attributes; ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.samples.net.Labels"); ButtonFactory.addSelectionToolTo(tb, editor); tb.addSeparator(); attributes = new HashMap<AttributeKey, Object>(); attributes.put(AttributeKeys.FILL_COLOR, Color.white); attributes.put(AttributeKeys.STROKE_COLOR, Color.black); attributes.put(AttributeKeys.TEXT_COLOR, Color.black); ButtonFactory.addToolTo(tb, editor, new TextCreationTool(new NodeFigure(), attributes), "edit.createNode", labels); attributes = new HashMap<AttributeKey, Object>(); attributes.put(AttributeKeys.STROKE_COLOR, new Color(0x000099)); ButtonFactory.addToolTo(tb, editor, new ConnectionTool(new LineConnectionFigure(), attributes), "edit.createLink", labels); }
private void addCreationButtonsTo(JToolBar tb, final DrawingEditor editor) { // AttributeKeys for the entitie sets HashMap<AttributeKey, Object> attributes; ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.samples.pert.Labels"); ResourceBundleUtil drawLabels = ResourceBundleUtil.getBundle("org.jhotdraw.draw.Labels"); ButtonFactory.addSelectionToolTo(tb, editor); tb.addSeparator(); attributes = new HashMap<AttributeKey, Object>(); attributes.put(AttributeKeys.FILL_COLOR, Color.white); attributes.put(AttributeKeys.STROKE_COLOR, Color.black); attributes.put(AttributeKeys.TEXT_COLOR, Color.black); ButtonFactory.addToolTo(tb, editor, new CreationTool(new TaskFigure(), attributes), "edit.createTask", labels); attributes = new HashMap<AttributeKey, Object>(); attributes.put(AttributeKeys.STROKE_COLOR, new Color(0x000099)); ButtonFactory.addToolTo(tb, editor, new ConnectionTool(new DependencyFigure(), attributes), "edit.createDependency", labels); tb.addSeparator(); ButtonFactory.addToolTo(tb, editor, new TextAreaCreationTool(new TextAreaFigure()), "edit.createTextArea", drawLabels); }
private void addCreationButtonsTo(JToolBar tb, final DrawingEditor editor) { // AttributeKeys for the entitie sets HashMap<AttributeKey,Object> attributes; ResourceBundleUtil labels = ResourceBundleUtil.getBundle("org.jhotdraw.samples.pert.Labels"); ResourceBundleUtil drawLabels = ResourceBundleUtil.getBundle("org.jhotdraw.draw.Labels"); ButtonFactory.addSelectionToolTo(tb, editor); tb.addSeparator(); attributes = new HashMap<AttributeKey,Object>(); attributes.put(AttributeKeys.FILL_COLOR, Color.white); attributes.put(AttributeKeys.STROKE_COLOR, Color.black); attributes.put(AttributeKeys.TEXT_COLOR, Color.black); ButtonFactory.addToolTo(tb, editor, new CreationTool(new TaskFigure(), attributes), "edit.createTask", labels); attributes = new HashMap<AttributeKey,Object>(); attributes.put(AttributeKeys.STROKE_COLOR, new Color(0x000099)); ButtonFactory.addToolTo(tb, editor, new ConnectionTool(new DependencyFigure(), attributes), "edit.createDependency", labels); tb.addSeparator(); ButtonFactory.addToolTo(tb, editor, new TextAreaCreationTool(new TextAreaFigure()), "edit.createTextArea", drawLabels); }
af = (AbstractAttributedFigure) ct.getPrototype(); af.set(END_DECORATION, new ArrowTip(0.35, 12, 11.3)); ButtonFactory.addToolTo(tb, editor, new ConnectionTool(new LineConnectionFigure()), "edit.createLineConnection", labels); ButtonFactory.addToolTo(tb, editor, cnt = new ConnectionTool(new LineConnectionFigure()), "edit.createElbowConnection", labels); lc = cnt.getPrototype(); lc.setLiner(new ElbowLiner()); ButtonFactory.addToolTo(tb, editor, cnt = new ConnectionTool(new LineConnectionFigure()), "edit.createCurvedConnection", labels); lc = cnt.getPrototype(); lc.setLiner(new CurvedLiner());
af = (AbstractAttributedFigure) ct.getPrototype(); af.set(END_DECORATION, new ArrowTip(0.35, 12, 11.3)); ButtonFactory.addToolTo(tb, editor, new ConnectionTool(new LineConnectionFigure()), "edit.createLineConnection", labels); ButtonFactory.addToolTo(tb, editor, cnt = new ConnectionTool(new LineConnectionFigure()), "edit.createElbowConnection", labels); lc = cnt.getPrototype(); lc.setLiner(new ElbowLiner()); ButtonFactory.addToolTo(tb, editor, cnt = new ConnectionTool(new LineConnectionFigure()), "edit.createCurvedConnection", labels); lc = cnt.getPrototype(); lc.setLiner(new CurvedLiner());