public static Color fromObject(Object v) { return fromObject(v, 255); }
public Paint transform(T input) { if (pickedState == null) { return ColorUtil.fromObject(input, 100); } else if (pickedState.isPicked(input)) { return UIDefaults.SELECTEDCOLOR; } else { return ColorUtil.fromObject(input, 100); } }
public Paint transform(T input) { if (pickedState == null) { return ColorUtil.fromObject(input, 100); } else if (pickedState.isPicked(input)) { return UIDefaults.SELECTEDCOLOR; } else { return ColorUtil.fromObject(input, 100); } }
public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2d = (Graphics2D) g; if (pickedVertexState.isPicked(v)) { g2d.setColor(UIDefaults.SELECTEDCOLOR); } else { g2d.setColor(ColorUtil.fromObject(v)); } g2d.fillOval(x, y, 10, 10); g2d.setColor(new Color(150, 150, 150, 150)); g2d.drawOval(x, y, 10, 10); } };
public void paintIcon(Component c, Graphics g, int x, int y) { Graphics2D g2d = (Graphics2D) g; if (pickedVertexState.isPicked(v)) { g2d.setColor(UIDefaults.SELECTEDCOLOR); } else { g2d.setColor(ColorUtil.fromObject(v)); } g2d.fillOval(x, y, 10, 10); g2d.setColor(new Color(150, 150, 150, 150)); g2d.drawOval(x, y, 10, 10); } };
c.setBackground(Color.WHITE); } else { c.setBackground(ColorUtil.fromObject(mv));
label.setHorizontalAlignment(JLabel.CENTER); Color c = ColorUtil.fromObject(value);
Color bg = ColorUtil.fromObject(o); Color fg = ColorUtil.contrastBW(bg); writer.write("<td class=\"text-right\" style=\"color:" + ColorUtil.toHtmlColor(fg)
paintTreeRect(g, subChildCounts, x, y, width, height); } else { g.setColor(ColorUtil.fromObject(s.getObject())); g.fillRect(x + 1, y + 1, width - 1, height - 1); paintTreeRect(g, subChildCounts, x, y, w, height); } else { g.setColor(ColorUtil.fromObject(s.getObject())); g.fillRect(x + 1, y + 1, w - 1, height - 1); paintTreeRect(g, subChildCounts, x, y, width, h); } else { g.setColor(ColorUtil.fromObject(s.getObject())); g.fillRect(x + 1, y + 1, width - 1, h - 1);
public void fireValueChanged(Coordinates coordinates, Object value) { iconUpToDate = false; dataCache.put(coordinates, new DataItem(value, ColorUtil.fromObject(value))); for (final Object o : getListenerList().getListenerList()) { if (o instanceof TableModelListener64) { ((TableModelListener64) o).tableChanged(new TableModelEvent64(this, coordinates.getRow(), coordinates .getRow(), coordinates.getColumn(), TableModelEvent64.UPDATE)); } else if (o instanceof TableModelListener) { ((TableModelListener) o).tableChanged(new TableModelEvent(this, MathUtil.longToInt(coordinates.getRow()), MathUtil.longToInt(coordinates.getRow()), MathUtil .longToInt(coordinates.getColumn()), TableModelEvent.UPDATE)); } } super.fireValueChanged(); }
Object object = matrixGUIObject.getMatrix().getAsObject(coordinates.getLongCoordinates()); matrixGUIObject.getDataCache().put(coordinates, new DataItem(object, ColorUtil.fromObject(object)));