Package org.openbp.cockpit.modeler.figures.generic

Examples of org.openbp.cockpit.modeler.figures.generic.Colorizable


      }

      if (figure instanceof Colorizable)
      {
        // Make the color chooser display the color of the selected object if it has a custom color
        Colorizable colorizable = (Colorizable) figure;
        Color figureColor = colorizable.getFillColor();
        Color defaultColor = colorizable.getDefaultFillColor();
        if (figureColor != null && ! figureColor.equals(defaultColor))
        {
          modeler.fireEvent("colorchooser.setcolor", figureColor);
        }
      }
View Full Code Here


          });
        }

        if (flavor [i].equals(ModelerFlavors.COLORIZABLE))
        {
          final Colorizable col = (Colorizable) ie.getSafeTransferData(flavor [i]);

          // 'Reset color' popup
          if (col.getFillColor() != null && !col.getFillColor().equals(col.getDefaultFillColor()))
          {
            group.addMenuChild(new JaspiraAction(modeler, "modeler.edit.resetcolor")
            {
              public void actionPerformed(ActionEvent e)
              {
                modeler.startUndo("Reset Color");

                // TODO Feature 6: Reset subordinate element color, too
                col.setFillColor(col.getDefaultFillColor());
                workspaceView.checkDamage();

                modeler.endUndo();
              }
            });
View Full Code Here

          workspaceView.singleSelect(figure);
        }

        if (flavor [i].equals(ModelerFlavors.COLORIZABLE))
        {
          final Colorizable col = (Colorizable) ie.getSafeTransferData(flavor [i]);

          if (col.getFillColor() != null && !col.getFillColor().equals(col.getDefaultFillColor()))
          {
            group.addMenuChild(new JaspiraAction(NodeItemEditorPlugin.this, "modeler.edit.resetcolor")
            {
              public void actionPerformed(ActionEvent e)
              {
                col.setFillColor(col.getDefaultFillColor());
                col.invalidate();
              }
            });
          }
        }
View Full Code Here

TOP

Related Classes of org.openbp.cockpit.modeler.figures.generic.Colorizable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.