java.awt.Button.getFont()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(121)

本文整理了Java中java.awt.Button.getFont()方法的一些代码示例,展示了Button.getFont()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.getFont()方法的具体详情如下:
包路径:java.awt.Button
类名称:Button
方法名:getFont

Button.getFont介绍

暂无

代码示例

代码示例来源:origin: stackoverflow.com

Button[][] buttons = new Button[][]{{}}; // fill your buttons array
 for (Button[] bb : buttons) {
   for (Button b : bb) {
     if (BUTTON SHOULD BE BOLD) {
       Font font = b.getFont();
       Font bold = new Font(font.getName(), Font.BOLD, font.getSize());
       b.setFont(bold);
     }
   }
 }

代码示例来源:origin: stackoverflow.com

count = count + 1;
if (count % 2 == 0) {
  btn.getFont().dispose();
  btn.setFont(arialFont);
} else {
  btn.getFont().dispose();
  btn.setFont(courierFont);

代码示例来源: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: 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: 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: 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: 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);
}

相关文章