Package javax.swing

Examples of javax.swing.LookAndFeel


    return value;
  }

  public static void adjustForLookandFeel()
  {
    LookAndFeel lf = UIManager.getLookAndFeel();
    if (lf.getName().equals("Mac OS X"))
    {
      Common.LFAdjustWidth = 0;
      Common.LFAdjustHeight = 0;
      Common.LFTreeMenuAdjustWidth = 13;
      Common.LFTreeMenuAdjustHeight = 13;
View Full Code Here


    return value;
  }

  public static void adjustForLookandFeel()
  {
    LookAndFeel lf = UIManager.getLookAndFeel();
    if (lf.getName().equals("Mac OS X"))
    {
      Common.LFAdjustWidth = 0;
      Common.LFAdjustHeight = 0;
      Common.LFTreeMenuAdjustWidth = 13;
      Common.LFTreeMenuAdjustHeight = 13;
View Full Code Here

            // Load Defaults from MotifLookAndFeel

            // This dummy load is necessary to get SystemColor initialized. !!!!!!
            Color c = SystemColor.text;

            LookAndFeel lnf = new XAWTLookAndFeel();
            uidefaults = lnf.getDefaults();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
View Full Code Here

    /**
     * Sets the parent of the passed in ActionMap to be the audio action
     * map.
     */
    static void installAudioActionMap(ActionMap map) {
        LookAndFeel laf = UIManager.getLookAndFeel();
        if (laf instanceof BasicLookAndFeel) {
            map.setParent(((BasicLookAndFeel)laf).getAudioActionMap());
        }
    }
View Full Code Here

     *
     * @param c JComponent to play the sound for.
     * @param actionKey Key for the sound.
     */
    static void playSound(JComponent c, Object actionKey) {
        LookAndFeel laf = UIManager.getLookAndFeel();
        if (laf instanceof BasicLookAndFeel) {
            ActionMap map = c.getActionMap();
            if (map != null) {
                Action audioAction = map.get(actionKey);
                if (audioAction != null) {
View Full Code Here

     *
     * @return <code>true</code> if the currently installed Look and feel
     *         is not <code>null</code> and supports window decorations.
     */
    public static boolean lookAndFeelSupportsWindowDecorations() {
        LookAndFeel lnf = UIManager.getLookAndFeel();
        return lnf != null && lnf.getSupportsWindowDecorations();
    }
View Full Code Here

     *
     * @return <code>true</code> if the currently installed Look and feel
     *         is not <code>null</code> and supports window decorations.
     */
    public static boolean lookAndFeelSupportsWindowDecorations() {
        LookAndFeel lnf = UIManager.getLookAndFeel();
        return lnf != null && lnf.getSupportsWindowDecorations();
    }
View Full Code Here

      UIManager.setLookAndFeel(laf);
    } catch (Exception e) {
      e.printStackTrace();
    }
   
    LookAndFeel current = UIManager.getLookAndFeel();
   
    if (current.getName().equals("Metal")) {

      UIManager.put("swing.boldMetal", Boolean.FALSE);
    }
  }
View Full Code Here

   * 1 and menu separators have a minimum vertical thickness of 1.
   */
  public static void installGtkPopupBugWorkaround()
  {
      // Get current look-and-feel implementation class
      LookAndFeel laf = UIManager.getLookAndFeel();
      Class<?> lafClass = laf.getClass();
     
      // Do nothing when not using the problematic LaF
      if (!lafClass.getName().equals(
          "com.sun.java.swing.plaf.gtk.GTKLookAndFeel")) return;
     
View Full Code Here

    /**
     * @param args the command line arguments
     * @throws javax.swing.UnsupportedLookAndFeelException
     */
    public static void main(String[] args) throws UnsupportedLookAndFeelException {
        LookAndFeel lf;
        Plastic3DLookAndFeel.setPlasticTheme(new ExperienceRoyale());
        lf = new Plastic3DLookAndFeel();
        UIManager.setLookAndFeel(lf);
        ensureDatabase();
        DBHelper.openConnection();
View Full Code Here

TOP

Related Classes of javax.swing.LookAndFeel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.