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; }
public static String toString(Color c) { if (c instanceof GuessColor) { return (c.toString()); } else { return (c.getRed() + "," + c.getBlue() + "," + c.getGreen() + "," + c.getAlpha()); } }
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; }
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; } }
@Override public String toString() { /*<fileID> <fileName> (<sectorColor, <fileSize>s) <chunks> Example: 1 Quiz.doc (Red, 15s) [0-6] [12-18] [39-40] */ return fileID + " " + fileName + " (" + sectorColor.toString() + " " + fileSize + "s) + \n " + getChunkString(); }
@Override public String toString() { return clr.toString(); }
public String toString() { return objColour.toString(); }
@Override public String toString() { return "The color is " + color.toString(); }
public MenuButtonAcqMode(Color color) { this(color, color.toString()); }