Package java.awt

Examples of java.awt.Graphics2D.drawRect()


    } else if (dropStatus == DROPPING_FORBIDDEN) {
      Rectangle bounds = adaptable.getContentPane().getBounds();
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setStroke(STROKE);
      g2d.setColor(RED_COLOR);
      g2d.drawRect(0, 0, bounds.width, 22);
    } else if (dropStatus == DROPPING_PERMITTED) {
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setStroke(STROKE);
      g2d.setColor(GREEN_COLOR);
      Rectangle bounds = adaptable.getContentPane().getBounds();
View Full Code Here


    } else if (dropStatus == DROPPING_PERMITTED) {
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setStroke(STROKE);
      g2d.setColor(GREEN_COLOR);
      Rectangle bounds = adaptable.getContentPane().getBounds();
      g2d.drawRect(0, 0, bounds.width, 22);
    }
  }

  protected static Color RED_COLOR = new Color(255, 164, 0);
  protected static Color GREEN_COLOR = new Color(164, 255, 0);
View Full Code Here

        } else {
          y = insets.top;
          x = (parent.getWidth() - w - insets.left - insets.right) / 2 + insets.left;
        }
      }
      g2d.drawRect(x, y, w, h);
    }
  } 
}
View Full Code Here

      g2d.setComposite(composite);
      g2d.fillRect(0, 0, w, h);
      Stroke oldStroke = g2d.getStroke();
      g2d.setColor(GREEN_COLOR);
      g2d.setStroke(STROKE);
      g2d.drawRect(0, 0, w, h);
      g2d.setStroke(oldStroke);
      g2d.setComposite(oldComposite);
    }
  }
View Full Code Here

      g2d.setComposite(composite);
      g2d.fillRect(bounds.x, bounds.y, bounds.width, bounds.height);
      Stroke oldStroke = g2d.getStroke();
      g2d.setColor(((JSplitPaneDesignOperation)getOperation()).isForbid() ? GREEN_COLOR : RED_COLOR);
      g2d.setStroke(STROKE);
      g2d.drawRect(bounds.x, bounds.y, bounds.width, bounds.height);
      g2d.setStroke(oldStroke);
      g2d.setComposite(oldComposite);
    }
  }
View Full Code Here

      if (((JMenuDesignOperation)getOperation()).getDropStatus()== JMenuDesignOperation.DROPPING_FORBIDDEN) {
        JMenu jmenu = (JMenu) adaptable.getWidget();
        Graphics2D g2d = (Graphics2D) clipg;
        g2d.setStroke(STROKE);
        g2d.setColor(RED_COLOR);
        g2d.drawRect(0, 0, jmenu.getWidth(), jmenu.getHeight());
      } else if (((JMenuDesignOperation)getOperation()).getDropStatus()== JMenuDesignOperation.DROPPING_PERMITTED) {
        JMenu jmenu = (JMenu) adaptable.getWidget();
        Graphics2D g2d = (Graphics2D) clipg;
        g2d.setStroke(STROKE);
        g2d.setColor(GREEN_COLOR);
View Full Code Here

      } else if (((JMenuDesignOperation)getOperation()).getDropStatus()== JMenuDesignOperation.DROPPING_PERMITTED) {
        JMenu jmenu = (JMenu) adaptable.getWidget();
        Graphics2D g2d = (Graphics2D) clipg;
        g2d.setStroke(STROKE);
        g2d.setColor(GREEN_COLOR);
        g2d.drawRect(0, 0, jmenu.getWidth(), jmenu.getHeight());
      }
    }
  }

  protected static Color RED_COLOR = new Color(255, 164, 0);
View Full Code Here

    if (((JMenuBarDesignOperation) getOperation()).getDropStatus() == JMenuBarDesignOperation.DROPPING_FORBIDDEN) {
      JMenuBar jmenubar = (JMenuBar) adaptable.getWidget();
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setStroke(STROKE);
      g2d.setColor(RED_COLOR);
      g2d.drawRect(0, 0, jmenubar.getWidth(), jmenubar.getHeight());
    } else if (((JMenuBarDesignOperation) getOperation()).getDropStatus() == JMenuBarDesignOperation.DROPPING_PERMITTED) {
      JMenuBar jmenubar = (JMenuBar) adaptable.getWidget();
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setStroke(STROKE);
      g2d.setColor(GREEN_COLOR);
View Full Code Here

    } else if (((JMenuBarDesignOperation) getOperation()).getDropStatus() == JMenuBarDesignOperation.DROPPING_PERMITTED) {
      JMenuBar jmenubar = (JMenuBar) adaptable.getWidget();
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setStroke(STROKE);
      g2d.setColor(GREEN_COLOR);
      g2d.drawRect(0, 0, jmenubar.getWidth(), jmenubar.getHeight());
      g2d.drawLine(((JMenuBarDesignOperation) getOperation())
          .getInsert_x(), 0,
          ((JMenuBarDesignOperation) getOperation()).getInsert_x(),
          jmenubar.getHeight());
    }
View Full Code Here

    } else if (dropStatus == DROPPING_FORBIDDEN) {
      Rectangle bounds = adaptable.getContentPane().getBounds();
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setStroke(STROKE);
      g2d.setColor(RED_COLOR);
      g2d.drawRect(0, 0, bounds.width, 22);
    } else if (dropStatus == DROPPING_PERMITTED) {
      Graphics2D g2d = (Graphics2D) clipg;
      g2d.setStroke(STROKE);
      g2d.setColor(GREEN_COLOR);
      Rectangle bounds = adaptable.getContentPane().getBounds();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.