Examples of LookAndFeel


Examples of javax.swing.LookAndFeel

    public TimelineScroll( Session doc )
    {
        super( HORIZONTAL );
        this.doc    = doc;

    LookAndFeel laf = UIManager.getLookAndFeel();
    if( (laf != null) && laf.isNativeLookAndFeel() && (laf.getName().toLowerCase().indexOf( "aqua" ) >= 0) ) {
      trackMarginLeft = 6// for Aqua look and feel 
      trackMargin    = 39;
    } else {
      trackMarginLeft = 16// works for Metal, Motif, Liquid, Metouia
      trackMargin    = 32;
View Full Code Here

Examples of javax.swing.LookAndFeel

            return true;
        }
        else if ("ancestor" == eName && event.getNewValue() != null) {
            // Only update on an ancestor change when getting a valid
            // parent and the LookAndFeel wants this.
            LookAndFeel laf = UIManager.getLookAndFeel();
            return (laf instanceof SynthLookAndFeel &&
                    ((SynthLookAndFeel)laf).
                     shouldUpdateStyleOnAncestorChanged());
        }
        // Note: The following two nimbus based overrides should be refactored
View Full Code Here

Examples of javax.swing.LookAndFeel

   
    /**
     * Crates a new list and collects all available {@link LookAndFeel}s.
     */
    protected LookAndFeelList(){
        LookAndFeel feel = UIManager.getLookAndFeel();
        setDefault( new Info( feel.getClass().getName(), feel.getName() ));
        currentInfo = defaultInfo;
       
        setSystem( new Info( UIManager.getSystemLookAndFeelClassName(), "System" ));
       
        LookAndFeelInfo[] preset = UIManager.getInstalledLookAndFeels();
View Full Code Here

Examples of javax.swing.LookAndFeel

      getLafManager().changePalette();

    }
    protected boolean allowed(boolean enable){
      LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
      return getLafManager().isChangePaletteAllowed(lookAndFeel);
    }
View Full Code Here

Examples of javax.swing.LookAndFeel

 
  private static boolean isMac = System.getProperty("os.name").startsWith("Mac");
 
  private static void getXPlatformLook(JFileChooser fc) {
    if (isMac) {
      LookAndFeel lnf = UIManager.getLookAndFeel();
      // JFileChooser on Mac OS X with the native L&F doesn't work well.
      // If the native L&F of Mac is selected, disable it for the file chooser
      if (lnf.isNativeLookAndFeel()) {
        try {
          UIManager.setLookAndFeel(UIManager
              .getCrossPlatformLookAndFeelClassName());
        } catch (Exception e) {
          e.printStackTrace();
View Full Code Here

Examples of javax.swing.LookAndFeel

     *
     * @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

Examples of javax.swing.LookAndFeel

 
// <editor-fold defaultstate="collapsed" desc="initLookAndFeel">
 
  /** Be�ll�tja a form kin�zet�t */
  public static void initLookAndFeel() throws Exception{
    LookAndFeel lf = UIManager.getLookAndFeel();
    if (lf instanceof MetalLookAndFeel) {
      MetalLookAndFeel mlf = (MetalLookAndFeel)lf;
     
      mlf.setCurrentTheme(new DefaultMetalTheme());
      UIManager.setLookAndFeel(mlf);
View Full Code Here

Examples of javax.swing.LookAndFeel

    protected boolean hasDefaultsTab(String lookAndFeelName) {
        return defaultsTablesMap.get(lookAndFeelName) != null;
    }
   
    protected void addDefaultsTab() {
        LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
        JScrollPane scrollPane = new JScrollPane(createDefaultsTable());
        tabPane.addTab(lookAndFeel.getName() + " Defaults", scrollPane);
        defaultsTablesMap.put(lookAndFeel.getName(), scrollPane);
    }
View Full Code Here

Examples of javax.swing.LookAndFeel

        return UIManager.getLookAndFeel().getID().equals("Aqua");
    }


    static void ensureValidCache() {
        LookAndFeel currentLookAndFeel = UIManager.getLookAndFeel();
        if (currentLookAndFeel != cachedLookAndFeel) {
            clearLookAndFeelBasedCaches();
            cachedLookAndFeel = currentLookAndFeel;
        }
    }
View Full Code Here

Examples of javax.swing.LookAndFeel

   * @return The instantiated look and feel
   * @throws Exception
   *             in case of an error
   */
  public static SwingLookAndFeel forName(String className) throws Exception {
    LookAndFeel lookAndFeel = (LookAndFeel) Class.forName(className)
        .newInstance();
    return new SwingLookAndFeel(lookAndFeel.getName(), lookAndFeel
        .getClass().getName());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.