本文整理汇总了Java中java.awt.Color.lightGray方法的典型用法代码示例。如果您正苦于以下问题:Java Color.lightGray方法的具体用法?Java Color.lightGray怎么用?Java Color.lightGray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.Color
的用法示例。
在下文中一共展示了Color.lightGray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNoFocusSelectionBackground
import java.awt.Color; //导入方法依赖的package包/类
static Color getNoFocusSelectionBackground() {
if (noFocusSelectionBackground == null) {
//allow theme/ui custom definition
noFocusSelectionBackground =
UIManager.getColor("nb.explorer.noFocusSelectionBackground"); //NOI18N
if (noFocusSelectionBackground == null) {
//try to get standard shadow color
noFocusSelectionBackground = UIManager.getColor("controlShadow"); //NOI18N
if (noFocusSelectionBackground == null) {
//Okay, the look and feel doesn't suport it, punt
noFocusSelectionBackground = Color.lightGray;
}
//Lighten it a bit because disabled text will use controlShadow/
//gray
noFocusSelectionBackground = betterBrighter(noFocusSelectionBackground);
}
}
return noFocusSelectionBackground;
}
示例2: setFlat
import java.awt.Color; //导入方法依赖的package包/类
/**
* Set how to paint renderer.
* @param f <code>true</code> means flat, <code>false</code> means with button border
*/
public void setFlat(boolean f) {
Color controlDkShadow = Color.lightGray;
if (UIManager.getColor("controlDkShadow") != null) {
controlDkShadow = UIManager.getColor("controlDkShadow"); // NOI18N
}
Color controlLtHighlight = Color.black;
if (UIManager.getColor("controlLtHighlight") != null) {
controlLtHighlight = UIManager.getColor("controlLtHighlight"); // NOI18N
}
Color buttonFocusColor = Color.blue;
if (UIManager.getColor("Button.focus") != null) {
buttonFocusColor = UIManager.getColor("Button.focus"); // NOI18N
}
flat = f ? Boolean.TRUE : Boolean.FALSE;
}
示例3: getUnfocusedSelectionBackground
import java.awt.Color; //导入方法依赖的package包/类
/** Get the system-wide unfocused selection background color */
private static Color getUnfocusedSelectionBackground() {
if (unfocusedSelBg == null) {
//allow theme/ui custom definition
unfocusedSelBg = UIManager.getColor("nb.explorer.unfocusedSelBg"); //NOI18N
if (unfocusedSelBg == null) {
//try to get standard shadow color
unfocusedSelBg = UIManager.getColor("controlShadow"); //NOI18N
if (unfocusedSelBg == null) {
//Okay, the look and feel doesn't suport it, punt
unfocusedSelBg = Color.lightGray;
}
//Lighten it a bit because disabled text will use controlShadow/
//gray
if (!Color.WHITE.equals(unfocusedSelBg.brighter())) {
unfocusedSelBg = unfocusedSelBg.brighter();
}
}
}
return unfocusedSelBg;
}
示例4: paint
import java.awt.Color; //导入方法依赖的package包/类
/**
* Paints this JLayeredPane within the specified graphics context.
*
* @param g the Graphics context within which to paint
*/
public void paint(Graphics g) {
if(isOpaque()) {
Rectangle r = g.getClipBounds();
Color c = getBackground();
if(c == null)
c = Color.lightGray;
g.setColor(c);
if (r != null) {
g.fillRect(r.x, r.y, r.width, r.height);
}
else {
g.fillRect(0, 0, getWidth(), getHeight());
}
}
super.paint(g);
}
示例5: crearEInicializarVisorGraficaEstadisticas
import java.awt.Color; //导入方法依赖的package包/类
@Override
public void crearEInicializarVisorGraficaEstadisticas(String tituloVentanaVisor,
String tituloLocalGrafico,
String tituloEjeX,
String tituloEjeY) throws Exception {
PlotOrientation orientacionPlot = PlotOrientation.VERTICAL;
boolean incluyeLeyenda = true;
boolean incluyeTooltips = true;
Color colorChartBackgroundPaint = Color.white;
Color colorChartPlotBackgroundPaint = Color.lightGray;
Color colorChartPlotDomainGridlinePaint = Color.white;
Color colorChartPlotRangeGridlinePaint = Color.white;
// VisualizacionJfreechart visualizadorJFchart = new VisualizacionJfreechart("tituloVenanaVisor");
visualizadorJFchart = new VisualizacionJfreechart(tituloVentanaVisor);
visualizadorJFchart.inicializacionJFreeChart(tituloLocalGrafico, tituloEjeX, tituloEjeY, orientacionPlot, incluyeLeyenda, incluyeTooltips, false);
visualizadorJFchart.setColorChartBackgroundPaint(colorChartBackgroundPaint);
visualizadorJFchart.setColorChartPlotBackgroundPaint(colorChartPlotBackgroundPaint);
visualizadorJFchart.setColorChartPlotDomainGridlinePaint(colorChartPlotDomainGridlinePaint);
visualizadorJFchart.setColorChartPlotRangeGridlinePaint(colorChartPlotRangeGridlinePaint);
}
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:23,代码来源:ClaseGeneradoraRecursoVisualizadorEntornosSimulacion.java
示例6: setFlat
import java.awt.Color; //导入方法依赖的package包/类
/**
* Set how to paint renderer.
* @param f <code>true</code> means flat, <code>false</code> means with button border
*/
public void setFlat(boolean f) {
Color controlDkShadow = Color.lightGray;
if (UIManager.getColor ("controlDkShadow") != null) controlDkShadow = UIManager.getColor ("controlDkShadow"); // NOI18N
Color controlLtHighlight = Color.black;
if (UIManager.getColor ("controlLtHighlight") != null) controlLtHighlight = UIManager.getColor ("controlLtHighlight"); // NOI18N
Color buttonFocusColor = Color.blue;
if (UIManager.getColor ("Button.focus") != null) buttonFocusColor = UIManager.getColor ("Button.focus"); // NOI18N
flat = f ? Boolean.TRUE : Boolean.FALSE;
}
示例7: setTextColor
import java.awt.Color; //导入方法依赖的package包/类
/**
* Sets the text Color for the activator text.
* The following is a list of supported Color names
* <ul>
* <li>black
* <li>blue
* <li>cyan
* <li>darkGray
* <li>gray
* <li>green
* <li>lightGray
* <li>magenta
* <li>orange
* <li>pink
* <li>red
* <li>white
* <li>yellow
* </ul>
*/
public void setTextColor(String name) {
Color color=null;
if ("black".equals(name)) {
color = Color.black;
} else if ("blue".equals(name)) {
color = Color.blue;
} else if ("cyan".equals(name)) {
color = Color.cyan;
} else if ("darkGray".equals(name)) {
color = Color.darkGray;
} else if ("gray".equals(name)) {
color = Color.gray;
} else if ("green".equals(name)) {
color = Color.green;
} else if ("lightGray".equals(name)) {
color = Color.lightGray;
} else if ("magenta".equals(name)) {
color = Color.magenta;
} else if ("orange".equals(name)) {
color = Color.orange;
} else if ("pink".equals(name)) {
color = Color.pink;
} else if ("red".equals(name)) {
color = Color.red;
} else if ("white".equals(name)) {
color = Color.white;
} else if ("yellow".equals(name)) {
color = Color.yellow;
}
if (color == null) {
return;
}
textAttribs.removeAttribute(StyleConstants.Foreground);
textAttribs.addAttribute(StyleConstants.Foreground, color);
setForeground(color);
}
示例8: setEditable
import java.awt.Color; //导入方法依赖的package包/类
public void setEditable(boolean b) {
super.setEnabled(b);
if (b) {
super.setBackground(Color.white);
} else {
super.setBackground(Color.lightGray);
} // end of if (b)else
}
示例9: initGridLines
import java.awt.Color; //导入方法依赖的package包/类
/**
* Initialize grid lines.
*/
private void initGridLines() {
gridLines = new Line[base.getDimension() - 1][linesSlicing.length];
int i2 = 0;
for (int i = 0; i < base.getDimension() - 1; i++) {
if (i2 == index) {
i2++;
}
for (int j = 0; j < gridLines[i].length; j++) {
double[] originBase = new double[base.getDimension()];
double[] endBase = new double[base.getDimension()];
System.arraycopy(origin, 0, originBase, 0, base.getDimension());
System.arraycopy(origin, 0, endBase, 0, base.getDimension());
endBase[i2] = base.getCoordinateSpace()[i2 + 1][i2];
originBase[index] = linesSlicing[j];
endBase[index] = linesSlicing[j];
if (j == 0 || j == gridLines[i].length - 1) {
gridLines[i][j] = new Line(originBase, endBase);
} else {
gridLines[i][j] = new Line(Line.Style.DOT, Color.lightGray, originBase, endBase);
}
}
i2++;
}
}
示例10: setLightLines
import java.awt.Color; //导入方法依赖的package包/类
private void setLightLines() {
// System.out.println(" s setLightLines");
lightLines = new Line[base.dimension - 1][linesSlicing.length];
int i2 = 0;
for (int i = 0; i < base.dimension - 1; i++) {
if (i2 == index) {
i2++;
}
for (int j = 0; j < lightLines[i].length; j++) {
double[] origin_tmp = new double[base.dimension];
double[] end_tmp = new double[base.dimension];
System.arraycopy(origin, 0, origin_tmp, 0, base.dimension);
System.arraycopy(end, 0, end_tmp, 0, base.dimension);
end_tmp[i2] = base.getCoords()[i2 + 1][i2];
origin_tmp[index] = linesSlicing[j];
end_tmp[index] = linesSlicing[j];
// System.out.println("index= "+index+"
// "+Array.toString(origin_tmp));
// System.out.println("index= "+index+"
// "+Array.toString(end_tmp)+"\n");
lightLines[i][j] = new Line(Color.lightGray, origin_tmp,
end_tmp);
}
i2++;
}
}
示例11: randomColor
import java.awt.Color; //导入方法依赖的package包/类
private Color randomColor() {
Color colors[] = {Color.black, Color.blue, Color.cyan,
Color.gray, Color.darkGray, Color.green,
Color.lightGray, Color.magenta, Color.orange,
Color.pink,Color.red, Color.white, Color.yellow};
return colors[(int)(Math.random() * colors.length)];
}
示例12: setEditable
import java.awt.Color; //导入方法依赖的package包/类
public void setEditable(boolean b) {
super.setEditable(b);
if (b) {
super.setBackground(Color.white);
} else {
super.setBackground(Color.lightGray);
} // end of if (b)else
}
示例13: createDefaultPaintArray
import java.awt.Color; //导入方法依赖的package包/类
/**
* Convenience method to return an array of <code>Paint</code> objects that represent
* the pre-defined colors in the <code>Color<code> and <code>ChartColor</code> objects.
*
* @return an array of objects with the <code>Paint</code> interface.
*/
public static Paint[] createDefaultPaintArray() {
return new Paint[] {
Color.red,
Color.blue,
Color.green,
Color.yellow,
Color.orange,
Color.magenta,
Color.cyan,
Color.pink,
Color.gray,
ChartColor.DARK_RED,
ChartColor.DARK_BLUE,
ChartColor.DARK_GREEN,
ChartColor.DARK_YELLOW,
ChartColor.DARK_MAGENTA,
ChartColor.DARK_CYAN,
Color.darkGray,
ChartColor.LIGHT_RED,
ChartColor.LIGHT_BLUE,
ChartColor.LIGHT_GREEN,
ChartColor.LIGHT_YELLOW,
ChartColor.LIGHT_MAGENTA,
ChartColor.LIGHT_CYAN,
Color.lightGray,
ChartColor.VERY_DARK_RED,
ChartColor.VERY_DARK_BLUE,
ChartColor.VERY_DARK_GREEN,
ChartColor.VERY_DARK_YELLOW,
ChartColor.VERY_DARK_MAGENTA,
ChartColor.VERY_DARK_CYAN,
ChartColor.VERY_LIGHT_RED,
ChartColor.VERY_LIGHT_BLUE,
ChartColor.VERY_LIGHT_GREEN,
ChartColor.VERY_LIGHT_YELLOW,
ChartColor.VERY_LIGHT_MAGENTA,
ChartColor.VERY_LIGHT_CYAN
};
}
示例14: createGuaranteedKeysAndValues
import java.awt.Color; //导入方法依赖的package包/类
@Override
public Object[] createGuaranteedKeysAndValues() {
return new Object[] {
"InternalFrame.activeTitleBackground",
new GuaranteedValue("InternalFrame.activeTitleBackground",
Color.BLUE),
"InternalFrame.borderShadow",
new GuaranteedValue("InternalFrame.borderShadow", Color.gray),
"InternalFrame.borderHighlight",
new GuaranteedValue("InternalFrame.borderHighlight",
Color.white),
"InternalFrame.borderDarkShadow",
new GuaranteedValue("InternalFrame.borderDarkShadow",
Color.darkGray),
"InternalFrame.borderLight",
new GuaranteedValue("InternalFrame.borderLight",
Color.lightGray),
"TabbedPane.background",
new GuaranteedValue("TabbedPane.background", Color.LIGHT_GRAY),
"TabbedPane.focus",
new GuaranteedValue("TabbedPane.focus", Color.GRAY),
"TabbedPane.highlight",
new GuaranteedValue("TabbedPane.highlight", Color.WHITE) ,
"Button.dashedRectGapX",
new GuaranteedValue("Button.dashedRectGapX", Integer.valueOf(5)),
"Button.dashedRectGapY",
new GuaranteedValue("Button.dashedRectGapY", Integer.valueOf(4)),
"Button.dashedRectGapWidth",
new GuaranteedValue("Button.dashedRectGapWidth", Integer.valueOf(10)),
"Button.dashedRectGapHeight",
new GuaranteedValue("Button.dashedRectGapHeight", Integer.valueOf(8)),
"Tree.expandedIcon", new TreeIcon(false),
"Tree.collapsedIcon", new TreeIcon(true)
};
}
示例15: LookupPaintScale
import java.awt.Color; //导入方法依赖的package包/类
/**
* Creates a new paint scale.
*/
public LookupPaintScale() {
this(0.0, 1.0, Color.lightGray);
}