Package javax.swing

Examples of javax.swing.LookAndFeel


      folder.delete();
    }
  }
  private boolean createDefCompValue(List<URL> list, IProgressMonitor monitor, final PrintWriter pw) {
    try {
      LookAndFeel current = UIManager.getLookAndFeel();
      LookAndFeel newLnf = createNewLnf(list);
      UIManager.setLookAndFeel(newLnf);
      monitor.beginTask(Messages.AddLafDialog_Create_Default_Values, BeanCreator.COMPONENTS.length);
      final JFrame jframe = new JFrame();
      jframe.setSize(100, 100);
      Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
View Full Code Here


    for (IWidgetPropertyDescriptor property : properties) {
      String id = (String) property.getId();
      this.propertyMap.put(id, property);
      property.setBean(bean);
    }
    LookAndFeel lnf = UIManager.getLookAndFeel();
    if (lnf == null)
      lnfClassname = UIManager.getCrossPlatformLookAndFeelClassName();
    else
      lnfClassname = lnf.getClass().getName();
  }
View Full Code Here

    private class CustomEditorPane extends JEditorPane {
        private final SketchBuffer buffer;

        public CustomEditorPane(SketchBuffer buffer) {
            super();
            LookAndFeel laf = UIManager.getLookAndFeel();
            if ( laf.getID().equals("Nimbus") )
            {
              //ugly fix so that we can change background in Nimbus
              setUI(new javax.swing.plaf.basic.BasicEditorPaneUI());
            }                   
            //setBackground(new Color(230,230,00));
View Full Code Here

    }
    VisualSwingPlugin.setCurrentEditor(this);
  }

  public void changeToLnf(String className) {
    LookAndFeel lnf = UIManager.getLookAndFeel();
    if (lnf == null) {
      if (className != null) {
        setLnfClassname(className);
      }
    } else {
      String lnfName = lnf.getClass().getName();
      if (className == null) {
        className = UIManager.getCrossPlatformLookAndFeelClassName();
        if (!lnfName.equals(className))
          setLnfClassname(className);
      } else if (!lnfName.equals(className)) {
View Full Code Here

  public void setLnfClassname(String lnfClassname) {
    ILookAndFeelAdapter adapter = ExtensionRegistry.getLnfAdapter(lnfClassname);
    if (adapter != null) {
      try {
        LookAndFeel oldlnf = UIManager.getLookAndFeel();
        LookAndFeel newlnf = adapter.getLookAndFeelInstance();
        if (!isLnfEqual(oldlnf, newlnf)) {
          AwtEnvironment.runWithLnf(newlnf, new ISyncUITask() {

            public Object doTask() throws Throwable {
              if (designer != null) {
View Full Code Here

  public String getLnfClassname() {
    VisualDesigner designer = getDesigner();
    if (designer != null)
      return designer.getLnfClassname();
    else {
      LookAndFeel lnf = UIManager.getLookAndFeel();
      String lnfClass;
      if (lnf == null)
        lnfClass = UIManager.getCrossPlatformLookAndFeelClassName();
      else
        lnfClass = lnf.getClass().getName();
      return lnfClass;
    }
  }
View Full Code Here

    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

            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

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

      getLafManager().changePalette();

    }
    protected boolean allowed(boolean enable){
      LookAndFeel lookAndFeel = UIManager.getLookAndFeel();
      return getLafManager().isChangePaletteAllowed(lookAndFeel);
    }
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.