2392 // Make sure property change listener is readded each time
2393 getValueFromDesktop();
2394 }
2395 }
2396
2397 private class FontDesktopProperty extends TriggerDesktopProperty {
2398 FontDesktopProperty(String key) {
2399 super(key);
2400 }
2401
2402 protected void updateUI() {
2403 Object aaTextInfo = SwingUtilities2.AATextInfo.getAATextInfo(true);
2404 UIDefaults defaults = UIManager.getLookAndFeelDefaults();
2405 defaults.put(SwingUtilities2.AA_TEXT_PROPERTY_KEY, aaTextInfo);
2406 super.updateUI();
2407 }
2408 }
2409
2410 // Windows LayoutStyle. From:
2411 // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch14e.asp
2412 private class WindowsLayoutStyle extends DefaultLayoutStyle {
2413 @Override
2414 public int getPreferredGap(JComponent component1,
2415 JComponent component2, ComponentPlacement type, int position,
2416 Container parent) {
2417 // Checks args
2418 super.getPreferredGap(component1, component2, type, position,
2419 parent);
2420
2421 switch(type) {
2422 case INDENT:
2423 // Windows doesn't spec this
2424 if (position == SwingConstants.EAST ||
2425 position == SwingConstants.WEST) {
2426 int indent = getIndent(component1, position);
2427 if (indent > 0) {
2428 return indent;
2429 }
2430 return 10;
2431 }
|
2392 // Make sure property change listener is readded each time
2393 getValueFromDesktop();
2394 }
2395 }
2396
2397 private class FontDesktopProperty extends TriggerDesktopProperty {
2398 FontDesktopProperty(String key) {
2399 super(key);
2400 }
2401
2402 protected void updateUI() {
2403 Object aaTextInfo = SwingUtilities2.AATextInfo.getAATextInfo(true);
2404 UIDefaults defaults = UIManager.getLookAndFeelDefaults();
2405 defaults.put(SwingUtilities2.AA_TEXT_PROPERTY_KEY, aaTextInfo);
2406 super.updateUI();
2407 }
2408 }
2409
2410 // Windows LayoutStyle. From:
2411 // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch14e.asp
2412 @SuppressWarnings("fallthrough")
2413 private class WindowsLayoutStyle extends DefaultLayoutStyle {
2414 @Override
2415 public int getPreferredGap(JComponent component1,
2416 JComponent component2, ComponentPlacement type, int position,
2417 Container parent) {
2418 // Checks args
2419 super.getPreferredGap(component1, component2, type, position,
2420 parent);
2421
2422 switch(type) {
2423 case INDENT:
2424 // Windows doesn't spec this
2425 if (position == SwingConstants.EAST ||
2426 position == SwingConstants.WEST) {
2427 int indent = getIndent(component1, position);
2428 if (indent > 0) {
2429 return indent;
2430 }
2431 return 10;
2432 }
|