protected String paramString() {
   String str;
   if (linkBehavior == ALWAYS_UNDERLINE) str = "ALWAYS_UNDERLINE";
   else if (linkBehavior == HOVER_UNDERLINE) str = "HOVER_UNDERLINE";
   else if (linkBehavior == NEVER_UNDERLINE) str = "NEVER_UNDERLINE";
   else str = "SYSTEM_DEFAULT";
   String colorStr = linkColor == null ? "" : linkColor.toString();
   String colorPressStr = colorPressed == null ? "" : colorPressed.toString();
   String disabledLinkColorStr = disabledLinkColor == null ? "" : disabledLinkColor.toString();
   String visitedLinkColorStr = visitedLinkColor == null ? "" : visitedLinkColor.toString();
   String buttonURLStr = buttonURL == null ? "" : buttonURL.toString();
   String isLinkVisitedStr = isLinkVisited ? "true" : "false";
   return super.paramString()
       + ",linkBehavior="
       + str
       + ",linkURL="
       + buttonURLStr
       + ",linkColor="
       + colorStr
       + ",activeLinkColor="
       + colorPressStr
       + ",disabledLinkColor="
       + disabledLinkColorStr
       + ",visitedLinkColor="
       + visitedLinkColorStr
       + ",linkvisitedString="
       + isLinkVisitedStr;
 }
Example #2
0
 @Override
 public String toString() {
   if (color == null || height < 1) {
     return "  ";
   } else {
     return color.toString().substring(0, 1) + height;
   }
 }
Example #3
0
 public static TexturePaint getCheckerBoard(int checkerSize, Color color1, Color color2) {
   String key = checkerSize + " " + color1.toString() + " " + color2.toString();
   if (checkers == null) checkers = new Hashtable<String, TexturePaint>();
   TexturePaint paint = checkers.get(key);
   if (paint == null) {
     BufferedImage bi =
         new BufferedImage(2 * checkerSize, 2 * checkerSize, BufferedImage.TYPE_INT_RGB);
     Graphics2D g = bi.createGraphics();
     g.setColor(color1);
     g.fillRect(0, 0, 2 * checkerSize, 2 * checkerSize);
     g.setColor(color2);
     g.fillRect(0, 0, checkerSize, checkerSize);
     g.fillRect(checkerSize, checkerSize, checkerSize, checkerSize);
     g.dispose();
     paint = new TexturePaint(bi, new Rectangle(0, 0, bi.getWidth(), bi.getHeight()));
     checkers.put(key, paint);
   }
   return paint;
 }
Example #4
0
  public void actionMouseClicked(InputEventInfo event) {
    if (event.getAction() == InputEventInfo.ACTION_PRESSED) {
      super.onMouseDown();
    } else if (event.getAction() == InputEventInfo.ACTION_RELEASED && isPressed) {
      // Networking.send(CalicoPacket.getPacket(NetworkCommand.CANVAS_REDO, cuid));
      Calico.logger.debug("Pressed Color button " + color.toString());
      CalicoDataStore.PenColor = color;
      CalicoDataStore.LastDrawingColor = color;

      if (CalicoDataStore.Mode != CInputMode.ARROW) CalicoDataStore.set_Mode(CInputMode.EXPERT);
      CCanvasController.redrawMenuBars();
      isPressed = false;
    }
  }
 public String toString() {
   return objColour.toString();
 }
Example #6
0
 public String toString() {
   return "Node # " + index + ", status= " + myColor.toString();
 }
 /**
  * Set the current Stroke Style to the specified color.
  *
  * @param color {@link Color}
  */
 public void setStrokeStyle(Color color) {
   impl.setStrokeStyle(color.toString());
 }
 /**
  * Set the current Fill Style to the specified color.
  *
  * @param color {@link Color}
  */
 public void setFillStyle(Color color) {
   impl.setFillStyle(color.toString());
 }
 /**
  * Sets the background color of the canvas element.
  *
  * @param color the background color.
  */
 public void setBackgroundColor(Color color) {
   impl.setBackgroundColor(getElement(), color.toString());
 }
 @Override
 public String toString() {
   return "The color is " + color.toString();
 }
 public MenuButtonAcqMode(Color color) {
   this(color, color.toString());
 }