List of usage examples for java.awt Toolkit getDesktopProperty
public final synchronized Object getDesktopProperty(String propertyName)
From source file:DynamicLayout.java
public static void main(String[] args) { Toolkit tk = Toolkit.getDefaultToolkit(); Object prop = tk.getDesktopProperty("awt.dynamicLayoutSupported"); System.out.println(tk.isDynamicLayoutActive() ? "yes" : "no"); if (tk.isDynamicLayoutActive()) tk.setDynamicLayout(false);//from ww w . j av a 2 s . c o m else tk.setDynamicLayout(true); System.out.println(tk.isDynamicLayoutActive() ? "yes" : "no"); }
From source file:RenderingUtils.java
private static Map desktopHints(Graphics2D g2) { if (isPrinting(g2)) { return null; }//from w w w . j a va 2 s . c o m Toolkit toolkit = Toolkit.getDefaultToolkit(); GraphicsDevice device = g2.getDeviceConfiguration().getDevice(); Map desktopHints = (Map) toolkit.getDesktopProperty(PROP_DESKTOPHINTS + '.' + device.getIDstring()); if (desktopHints == null) { desktopHints = (Map) toolkit.getDesktopProperty(PROP_DESKTOPHINTS); } // It is possible to get a non-empty map but with disabled AA. if (desktopHints != null) { Object aaHint = desktopHints.get(RenderingHints.KEY_TEXT_ANTIALIASING); if ((aaHint == RenderingHints.VALUE_TEXT_ANTIALIAS_OFF) || (aaHint == RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT)) { desktopHints = null; } } return desktopHints; }
From source file:de.darkblue.bongloader2.utils.ToolBox.java
public static void setDefaultRendering(Graphics2D context) { Toolkit tk = Toolkit.getDefaultToolkit(); Map desktopHints = (Map) (tk.getDesktopProperty("awt.font.desktophints")); if (desktopHints != null) { context.addRenderingHints(desktopHints); }// w w w . jav a2 s . co m }
From source file:FontHints.java
/** Creates a new instance of FontHints */ public FontHints() { Toolkit tk = Toolkit.getDefaultToolkit(); desktopHints = (Map) (tk.getDesktopProperty("awt.font.desktophints")); }
From source file:com.googlecode.vfsjfilechooser2.VFSJFileChooser.java
private void installShowFilesListener() { // Track native setting for showing hidden files Toolkit tk = Toolkit.getDefaultToolkit(); Object showHiddenProperty = tk.getDesktopProperty(SHOW_HIDDEN_PROP); if (showHiddenProperty instanceof Boolean) { useFileHiding = !((Boolean) showHiddenProperty).booleanValue(); showFilesListener = new WeakPCL(this); tk.addPropertyChangeListener(SHOW_HIDDEN_PROP, showFilesListener); }/*w ww .java 2 s . co m*/ }