protected static String getColorString(final Color color) { String name = "none"; name = Colors.getColorName(color, name); if (!"none".equals(name)) name = Colors.colorToString(color); return name; }
void setColor(Color c) { String name = Colors.getColorName(c, ""); if (name.length() > 0) { Vector choices = gd.getChoices(); Choice ch = (Choice)choices.elementAt(0); ch.select(name); } }
void setColor(Color c) { String name = Colors.getColorName(c, ""); if (name.length() > 0) { Vector choices = gd.getChoices(); Choice ch = (Choice)choices.elementAt(0); ch.select(name); } }
public void showDialog() { showLabels = overlay.getDrawLabels(); showNames = overlay.getDrawNames(); drawBackgrounds = overlay.getDrawBackgrounds(); colorName = Colors.getColorName(overlay.getLabelColor(), "white"); fontSize = 12; Font font = overlay.getLabelFont(); if (font!=null) { fontSize = font.getSize(); bold = font.getStyle()==Font.BOLD; } gd = new GenericDialog("Labels"); gd.addChoice("Color:", Colors.colors, colorName); gd.addChoice("Font size:", fontSizes, ""+fontSize); gd.addCheckbox("Show labels", showLabels); gd.addCheckbox("Use names as labels", showNames); gd.addCheckbox("Draw backgrounds", drawBackgrounds); gd.addCheckbox("Bold", bold); gd.addDialogListener(this); gd.showDialog(); }
public void showDialog() { showLabels = overlay.getDrawLabels(); showNames = overlay.getDrawNames(); drawBackgrounds = overlay.getDrawBackgrounds(); colorName = Colors.getColorName(overlay.getLabelColor(), "white"); fontSize = 12; Font font = overlay.getLabelFont(); if (font!=null) { fontSize = font.getSize(); bold = font.getStyle()==Font.BOLD; } gd = new GenericDialog("Labels"); gd.addChoice("Color:", Colors.colors, colorName); gd.addChoice("Font size:", fontSizes, ""+fontSize); gd.addCheckbox("Show labels", showLabels); gd.addCheckbox("Use names as labels", showNames); gd.addCheckbox("Draw backgrounds", drawBackgrounds); gd.addCheckbox("Bold", bold); gd.addDialogListener(this); gd.showDialog(); }
void showDialog() { Color fc =Toolbar.getForegroundColor(); String fname = getColorName(fc, "black"); Color bc =Toolbar.getBackgroundColor(); String bname = getColorName(bc, "white"); Color sc =Roi.getColor(); String sname = getColorName(sc, "yellow"); GenericDialog gd = new GenericDialog("Colors"); gd.addChoice("Foreground:", colors, fname);
void showDialog() { Color fc =Toolbar.getForegroundColor(); String fname = getColorName(fc, "black"); Color bc =Toolbar.getBackgroundColor(); String bname = getColorName(bc, "white"); Color sc =Roi.getColor(); String sname = getColorName(sc, "yellow"); GenericDialog gd = new GenericDialog("Colors"); gd.addChoice("Foreground:", colors, fname);
multipointTool = true; Color sc =Roi.getColor(); String sname = Colors.getColorName(sc, "Yellow"); Color cc =PointRoi.getDefaultCrossColor(); String cname = Colors.getColorName(cc, "None"); String type = PointRoi.types[PointRoi.getDefaultType()]; String size = PointRoi.sizes[PointRoi.getDefaultSize()];
multipointTool = true; Color sc =Roi.getColor(); String sname = Colors.getColorName(sc, "Yellow"); Color cc =PointRoi.getDefaultCrossColor(); String cname = Colors.getColorName(cc, "None"); String type = PointRoi.types[PointRoi.getDefaultType()]; String size = PointRoi.sizes[PointRoi.getDefaultSize()];