Package java.awt

Examples of java.awt.Color.darker()


            g.drawLine( dx / 2, dy, dx, 0 );
            g.drawLine( dx / 2, dy + shift, dx, shift );

            // Horizontal line.
            if ( descending ) {
                g.setColor( color.darker().darker() );
            } else {
                g.setColor( color.brighter().brighter() );
            }
            g.drawLine( dx, 0, 0, 0 );
View Full Code Here


        case EPR:
            shape = new Ellipse2D.Double(point.x - CONTROL_PORT_SIZE / 2, point.y - CONTROL_PORT_SIZE / 2,
                    CONTROL_PORT_SIZE, CONTROL_PORT_SIZE);
            break;
        }
        DrawUtils.gradientFillShape(g, color.brighter().brighter().brighter().brighter(), color.darker(), shape);
        if (getPortText()!=null){
          g.setColor(Color.WHITE);
            Font oldFont = g.getFont();
        g.setFont(new Font(oldFont.getFontName(),Font.BOLD,7));
            Rectangle2D bounds = g.getFontMetrics().getStringBounds(getPortText(), g);
View Full Code Here

        comp.setForeground(componentFC);
        if (comp instanceof JTextComponent) {
          JTextComponent textComp = (JTextComponent) comp;         
          Color inverseColor = new Color(255-(int) (componentFC.getRed()*0.7),
            255-(int) (componentFC.getGreen()*0.7),255-(int) (componentFC.getBlue()*0.7));
          textComp.setSelectionColor(inverseColor.darker());         
        }       
      }
      setFont(comp, componentFFamilyString, componentFSizeString, componentFWeightString);
      if ((componentBorder!=null)&&(componentBStyleString.trim().toLowerCase().equals("solid"))) {
        if (comp instanceof JButton) {
View Full Code Here

                mask.runValidate();
                if (style == PaintStyle.STYLE_GLOW) {
                        mask.draw(this, g, GLFX.gfx.FX_DOWNREFLEXION_EXT, new Point(0, 0), ledColor);
                }
                if (style == PaintStyle.STYLE_FLAT) {
                        mask.draw(this, g, GLFX.gfx.FX_SHADOW.bit(), new Point(3, 3), ledColor.darker());
                }
                g.setComposite(cps);
                g.setColor(c);
                g.translate(compBounds.x, compBounds.y);
                g.setClip(clip);
View Full Code Here

      final int dx = (int) (size / 2 * Math.pow(0.8, priority));
      final int dy = descending ? dx : -dx;
      y = y + 5 * size / 6 + (descending ? -dy : 0);
      final int shift = descending ? 1 : -1;
      g.translate(x, y);
      g.setColor(color.darker());
      g.drawLine(dx / 2, dy, 0, 0);
      g.drawLine(dx / 2, dy + shift, 0, shift);
      g.setColor(color.brighter());
      g.drawLine(dx / 2, dy, dx, 0);
      g.drawLine(dx / 2, dy + shift, dx, shift);
View Full Code Here

      g.drawLine(dx / 2, dy + shift, 0, shift);
      g.setColor(color.brighter());
      g.drawLine(dx / 2, dy, dx, 0);
      g.drawLine(dx / 2, dy + shift, dx, shift);
      if (descending) {
        g.setColor(color.darker().darker());
      }
      else {
        g.setColor(color.brighter().brighter());
      }
      g.drawLine(dx, 0, 0, 0);
View Full Code Here

    Stroke originalStroke = getStroke();
    setStroke(new BasicStroke(1.0f));
    if (raised) {
      setColor(originalColor.brighter());
    } else {
      setColor(originalColor.darker());
    }
    drawLine(x, y, x + width, y);
    drawLine(x, y, x, y + height);
    if (raised) {
      setColor(originalColor.darker());
View Full Code Here

      setColor(originalColor.darker());
    }
    drawLine(x, y, x + width, y);
    drawLine(x, y, x, y + height);
    if (raised) {
      setColor(originalColor.darker());
    } else {
      setColor(originalColor.brighter());
    }
    drawLine(x + width, y + height, x, y + height);
    drawLine(x + width, y + height, x + width, y);
View Full Code Here

  public void fill3DRect(int x, int y, int width, int height, boolean raised) {
    Color originalColor = getColor();
    if (raised) {
      setColor(originalColor.brighter());
    } else {
      setColor(originalColor.darker());
    }
    draw(new Rectangle(x, y, width, height), "fill");
    setColor(originalColor);
    draw3DRect(x, y, width, height, raised);
  }
View Full Code Here

                highlight = "#"+Integer.toHexString(valueColor.brighter().getRGB()).substring(2);
                newAttributes.addAttribute("","highlight","highlight","",highlight);
            }

            if(lowlight==null){
                lowlight = "#"+Integer.toHexString(valueColor.darker().getRGB()).substring(2);
                newAttributes.addAttribute("","lowlight","lowlight","",lowlight);
            }  
           
            if(font==null){
                if(brightness<0.5) {
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.