本文整理了Java中java.awt.Button.setForeground()
方法的一些代码示例,展示了Button.setForeground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.setForeground()
方法的具体详情如下:
包路径:java.awt.Button
类名称:Button
方法名:setForeground
暂无
代码示例来源:origin: wildfly/wildfly
graphics.setColor(default_color);
panel.setBackground(Color.white);
clear_button.setForeground(Color.blue);
leave_button.setForeground(Color.blue);
代码示例来源:origin: sc.fiji/MTrackJ_
void resetbuttons() {
final int mode = mtrackj.handler().mode();
addbutton.setForeground(mode==MTJHandler.ADD?Color.red:Color.black);
clusterbutton.setForeground(mode==MTJHandler.CLUSTER?Color.red:Color.black);
hidebutton.setForeground(mode==MTJHandler.HIDE?Color.red:Color.black);
mergebutton.setForeground(mode==MTJHandler.MERGE?Color.red:Color.black);
splitbutton.setForeground(mode==MTJHandler.SPLIT?Color.red:Color.black);
movebutton.setForeground(mode==MTJHandler.MOVE?Color.red:Color.black);
deletebutton.setForeground(mode==MTJHandler.DELETE?Color.red:Color.black);
referbutton.setForeground(mode==MTJHandler.REFER?Color.red:Color.black);
colorbutton.setForeground(mode==MTJHandler.COLOR?Color.red:Color.black);
setidsbutton.setForeground(mode==MTJHandler.SETIDS?Color.red:Color.black);
}
代码示例来源:origin: de.alpharogroup/swing-components
/**
* Initialize a button.
*
* @param button
* the button
* @param foreground
* the foreground
* @param background
* the background
*/
protected void initializeButton(final Button button, final Color foreground,
final Color background)
{
button.setForeground(foreground);
button.setBackground(background);
}
代码示例来源:origin: net.imagej/ij
private void createListeners() {
if (srcImp==null)
return;
ImagePlus.addImageListener(this);
Roi.addRoiListener(this);
if (live!=null) {
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
live.setForeground(Color.red);
}
}
代码示例来源:origin: net.imagej/ij
private void removeListeners() {
if (srcImp==null)
return;
ImagePlus.removeImageListener(this);
Roi.removeRoiListener(this);
if (live!=null) {
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize()));
live.setForeground(Color.black);
}
}
代码示例来源:origin: imagej/ImageJA
private void createListeners() {
if (srcImp==null)
return;
ImagePlus.addImageListener(this);
Roi.addRoiListener(this);
if (live!=null) {
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
live.setForeground(Color.red);
}
}
代码示例来源:origin: imagej/ImageJA
private void removeListeners() {
if (srcImp==null)
return;
ImagePlus.removeImageListener(this);
Roi.removeRoiListener(this);
if (live!=null) {
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize()));
live.setForeground(Color.black);
}
}
代码示例来源:origin: imagej/ImageJA
private void disableLivePlot() {
if (IJ.debugMode) IJ.log("PlotWindow.disableLivePlot: "+srcImp);
if (srcImp==null)
return;
if (bgThread!=null)
bgThread.interrupt();
bgThread = null;
ImagePlus.removeImageListener(this);
Roi.removeRoiListener(this);
if (live != null) {
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize()));
live.setForeground(Color.black);
}
}
代码示例来源:origin: net.imagej/ij
private void disableLivePlot() {
if (IJ.debugMode) IJ.log("PlotWindow.disableLivePlot: "+srcImp);
if (srcImp==null)
return;
if (bgThread!=null)
bgThread.interrupt();
bgThread = null;
ImagePlus.removeImageListener(this);
Roi.removeRoiListener(this);
if (live != null) {
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize()));
live.setForeground(Color.black);
}
}
代码示例来源:origin: imagej/ImageJA
private void enableLivePlot() {
if (plotMaker==null)
plotMaker = plot!=null?plot.getPlotMaker():null;
if (plotMaker==null) return;
srcImp = plotMaker.getSourceImage();
if (srcImp==null)
return;
if (bgThread==null) {
bgThread = new Thread(this, "Live Plot");
bgThread.setPriority(Math.max(bgThread.getPriority()-3, Thread.MIN_PRIORITY));
doUpdate = true;
bgThread.start();
}
if (IJ.debugMode) IJ.log("PlotWindow.createListeners");
ImagePlus.addImageListener(this);
Roi.addRoiListener(this);
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
live.setForeground(Color.red);
}
代码示例来源:origin: net.imagej/ij
private void enableLivePlot() {
if (plotMaker==null)
plotMaker = plot!=null?plot.getPlotMaker():null;
if (plotMaker==null) return;
srcImp = plotMaker.getSourceImage();
if (srcImp==null)
return;
if (bgThread==null) {
bgThread = new Thread(this, "Live Plot");
bgThread.setPriority(Math.max(bgThread.getPriority()-3, Thread.MIN_PRIORITY));
doUpdate = true;
bgThread.start();
}
if (IJ.debugMode) IJ.log("PlotWindow.createListeners");
ImagePlus.addImageListener(this);
Roi.addRoiListener(this);
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
live.setForeground(Color.red);
}
代码示例来源:origin: zitmen/thunderstorm
private void removeListeners() {
//IJ.log("removeListeners");
if(srcImp == null) {
return;
}
ImageCanvas canvas = srcImp.getCanvas();
canvas.removeMouseListener(this);
canvas.removeMouseMotionListener(this);
canvas.removeKeyListener(this);
ImagePlus.removeImageListener(this);
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.PLAIN, font.getSize()));
live.setForeground(Color.black);
}
代码示例来源:origin: sc.fiji/MTrackJ_
private Button addButton(final String label) {
final Button b = new Button(label);
b.setPreferredSize(new Dimension(86,22));
b.setForeground(Color.black);
b.setFont(dialogfont);
b.addActionListener(this);
b.addMouseListener(this);
gbc.gridx = leftbutton ? 0 : 1;
gbc.insets = new Insets(newblock?space:0,0,0,0);
gbl.setConstraints(b,gbc);
add(b);
leftbutton = !leftbutton;
if (leftbutton) {
++gbc.gridy;
newblock = false;
}
return b;
}
代码示例来源:origin: zitmen/thunderstorm
private void createListeners() {
//IJ.log("createListeners");
if(srcImp == null) {
return;
}
ImageCanvas canvas = srcImp.getCanvas();
if(canvas == null) {
return;
}
canvas.addMouseListener(this);
canvas.addMouseMotionListener(this);
canvas.addKeyListener(this);
ImagePlus.addImageListener(this);
Font font = live.getFont();
live.setFont(new Font(font.getName(), Font.BOLD, font.getSize()));
live.setForeground(Color.red);
}
代码示例来源:origin: IanDarwin/javasrc
public void init() {
setBackground(Color.cyan); // see Graphics chapter.
Panel p = new Panel();
p.setBackground(Color.red);
p.add(applyB = new Button("Apply"));
applyB.setBackground(Color.white);
p.add(exitB = new Button("Exit"));
exitB.setForeground(Color.red);
add(p); // add (connect) "p" to "this", the Applet
}
}
代码示例来源:origin: com.bbossgroups.rpc/bboss-rpc
graphics.setColor(default_color);
panel.setBackground(Color.white);
clear_button.setForeground(Color.blue);
leave_button.setForeground(Color.blue);
代码示例来源:origin: org.jgroups/com.springsource.org.jgroups
graphics.setColor(default_color);
panel.setBackground(Color.white);
clear_button.setForeground(Color.blue);
leave_button.setForeground(Color.blue);
代码示例来源:origin: apache/activemq-artemis
graphics.setColor(default_color);
panel.setBackground(Color.white);
clear_button.setForeground(Color.blue);
leave_button.setForeground(Color.blue);
代码示例来源:origin: apache/activemq-artemis
graphics.setColor(default_color);
panel.setBackground(Color.white);
clear_button.setForeground(Color.blue);
leave_button.setForeground(Color.blue);
代码示例来源:origin: org.apache.activemq/artemis-jms-client-all
graphics.setColor(default_color);
panel.setBackground(Color.white);
clear_button.setForeground(Color.blue);
leave_button.setForeground(Color.blue);
内容来源于网络,如有侵权,请联系作者删除!