Examples of LookAndFeel


Examples of javax.swing.LookAndFeel

    test2(harness);
  }
 
  private void test1(TestHarness harness)
  {
    LookAndFeel laf = new MyLookAndFeel();
    harness.check(UIManager.getAuxiliaryLookAndFeels(), null);
    UIManager.addAuxiliaryLookAndFeel(laf);
    LookAndFeel[] auxLafs = UIManager.getAuxiliaryLookAndFeels();
    harness.check(auxLafs.length, 1);
    harness.check(auxLafs[0], laf);
View Full Code Here

Examples of javax.swing.LookAndFeel

  {
    harness.checkPoint("test2");
    // first check that we are starting with 0 auxiliary LAFs
    harness.check(UIManager.getAuxiliaryLookAndFeels(), null);
   
    LookAndFeel laf1 = new MyLookAndFeel();
    LookAndFeel laf2 = new MyLookAndFeel();
    LookAndFeel laf3 = new MyLookAndFeel();
    LookAndFeel laf4 = new MyLookAndFeel();
   
    UIManager.addAuxiliaryLookAndFeel(laf1);
    UIManager.addAuxiliaryLookAndFeel(laf2);
    UIManager.addAuxiliaryLookAndFeel(laf3);
    UIManager.addAuxiliaryLookAndFeel(laf4);
View Full Code Here

Examples of javax.swing.LookAndFeel

   *
   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness
  {
    LookAndFeel laf1 = new MyLookAndFeel();
    try
    {
      UIManager.addPropertyChangeListener(this);
      UIManager.setLookAndFeel(laf1);
      harness.check(UIManager.getLookAndFeel(), laf1);
View Full Code Here

Examples of javax.swing.LookAndFeel

   *
   * @param harness  the test harness (<code>null</code> not permitted).
   */
  public void test(TestHarness harness)     
  {
    LookAndFeel laf = new MyLookAndFeel();
    harness.check(UIManager.getAuxiliaryLookAndFeels(), null);
    UIManager.addAuxiliaryLookAndFeel(laf);
    LookAndFeel[] auxLafs = UIManager.getAuxiliaryLookAndFeels();
    harness.check(auxLafs.length, 1);
    harness.check(auxLafs[0], laf);
View Full Code Here

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

Examples of javax.swing.LookAndFeel

    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

Examples of javax.swing.LookAndFeel

    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

Examples of javax.swing.LookAndFeel

    }
    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

Examples of javax.swing.LookAndFeel

  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

Examples of javax.swing.LookAndFeel

  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
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.