コード例 #1
0
 private static void changeTablesFont(Container c, Font f) {
   Component[] comps = c.getComponents();
   for (Component comp : comps) {
     if (comp instanceof LimeJTable) {
       changeTableFont((JTable) comp, f);
     } else if (comp instanceof Container) {
       changeTablesFont((Container) comp, f);
     }
   }
 }
コード例 #2
0
  public static void modifyTablesFont(int delta) {
    int currentSize = ApplicationSettings.GUI_TABLES_FONT_SIZE.getValue();
    if (currentSize == 0 || delta == 0) {
      currentSize = getDefaultFont().getSize();
    }

    int newSize = currentSize + delta;
    if (TABLE_FONT_SIZE_MIN <= newSize && newSize <= TABLE_FONT_SIZE_MAX) {
      ApplicationSettings.GUI_TABLES_FONT_SIZE.setValue(currentSize + delta);
      Font f = setupTableFont(UIManager.getLookAndFeelDefaults());

      changeTablesFont(f);
    }
  }
コード例 #3
0
 private static void changeTablesFont(Font f) {
   Frame[] frames = Frame.getFrames();
   for (Frame frame : frames) {
     changeTablesFont(frame, f);
   }
 }