Skip to content

Commit

Permalink
wtf is going on?
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent committed Sep 7, 2023
1 parent 1c8fb19 commit a44dc78
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 36 deletions.
70 changes: 35 additions & 35 deletions vassal-app/src/main/java/VASSAL/build/GameModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import VASSAL.build.module.ServerConnection;
import VASSAL.build.module.SpecialDiceButton;
import VASSAL.build.module.StartupGlobalKeyCommand;
import VASSAL.build.module.font.FontOrganizer;
//import VASSAL.build.module.font.FontOrganizer;
import VASSAL.build.module.ToolbarMenu;
import VASSAL.build.module.WizardSupport;
import VASSAL.build.module.documentation.HelpFile;
Expand All @@ -69,7 +69,7 @@
import VASSAL.build.module.properties.MutablePropertiesContainer;
import VASSAL.build.module.properties.MutableProperty;
import VASSAL.build.module.properties.PropertySource;
import VASSAL.build.module.properties.ScenarioOptions;
//import VASSAL.build.module.properties.ScenarioOptions;
import VASSAL.build.module.properties.TranslatableString;
import VASSAL.build.module.properties.TranslatableStringContainer;
import VASSAL.build.module.turn.TurnTracker;
Expand Down Expand Up @@ -148,9 +148,9 @@
import javax.swing.KeyStroke;
import javax.swing.SwingUtilities;
import javax.swing.Timer;
import javax.swing.UIManager;
//import javax.swing.UIManager;
import java.awt.Container;
import java.awt.Font;
//import java.awt.Font;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
Expand Down Expand Up @@ -514,19 +514,19 @@ public IndexManager getIndexManager() {
return indexManager;
}

/** Management of true-type fonts */
private FontOrganizer fontOrganizer;

public FontOrganizer getFontOrganizer() {
if (fontOrganizer == null) {
fontOrganizer = new FontOrganizer();
}
return fontOrganizer;
}

public void setFontOrganizer(FontOrganizer fontOrganizer) {
this.fontOrganizer = fontOrganizer;
}
// /** Management of true-type fonts */
// private FontOrganizer fontOrganizer;
//
// public FontOrganizer getFontOrganizer() {
// if (fontOrganizer == null) {
// fontOrganizer = new FontOrganizer();
// }
// return fontOrganizer;
// }
//
// public void setFontOrganizer(FontOrganizer fontOrganizer) {
// this.fontOrganizer = fontOrganizer;
// }

/**
* Error Logging to {@link Chatter}?
Expand Down Expand Up @@ -831,7 +831,7 @@ public void build(Element e) {
ensureComponent(PrototypesContainer.class);
ensureComponent(Chatter.class);
ensureComponent(KeyNamer.class);
ensureComponent(FontOrganizer.class);
//ensureComponent(FontOrganizer.class);
}
else {
buildDefaultComponents();
Expand Down Expand Up @@ -2044,23 +2044,23 @@ public static void init(GameModule module) throws IOException {
}
}

public void setUIFont() {
final Font f = theModule.getFontOrganizer().getEditorFont(Font.PLAIN, 12);

final java.util.Enumeration keys = UIManager.getDefaults().keys();
while (keys.hasMoreElements()) {
final Object key = keys.nextElement();
final Object value = UIManager.get(key);
if (value instanceof javax.swing.plaf.FontUIResource)
UIManager.put(key, f);
}

SwingUtilities.updateComponentTreeUI(theModule.frame);
SwingUtilities.updateComponentTreeUI(theModule.preferences.getGlobalPrefs().getEditor().getDialog());
SwingUtilities.updateComponentTreeUI(theModule.preferences.getEditor().getDialog());
SwingUtilities.updateComponentTreeUI(ScenarioOptions.getInstance().getDialog());

}
// public void setUIFont() {
// final Font f = theModule.getFontOrganizer().getEditorFont(Font.PLAIN, 12);
//
// final java.util.Enumeration keys = UIManager.getDefaults().keys();
// while (keys.hasMoreElements()) {
// final Object key = keys.nextElement();
// final Object value = UIManager.get(key);
// if (value instanceof javax.swing.plaf.FontUIResource)
// UIManager.put(key, f);
// }
//
// SwingUtilities.updateComponentTreeUI(theModule.frame);
// SwingUtilities.updateComponentTreeUI(theModule.preferences.getGlobalPrefs().getEditor().getDialog());
// SwingUtilities.updateComponentTreeUI(theModule.preferences.getEditor().getDialog());
// SwingUtilities.updateComponentTreeUI(ScenarioOptions.getInstance().getDialog());
//
// }
/**
* Save the current buildString for comparison when we try and quit.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public Component getControls() {
validator = new Validator();
nameField = new JTextArea(1, 100);

nameField.setFont(getEditorFont(Font.PLAIN, 14));
// nameField.setFont(getEditorFont(Font.PLAIN, 14));
nameField.setLineWrap(true);
nameField.setWrapStyleWord(true);
nameField.setBorder(BorderFactory.createLineBorder(Color.gray));
Expand Down

0 comments on commit a44dc78

Please sign in to comment.