Package aurelienribon.ui.css.swing.processors

Source Code of aurelienribon.ui.css.swing.processors.JComponentProcessor

package aurelienribon.ui.css.swing.processors;

import aurelienribon.ui.css.DeclarationSet;
import aurelienribon.ui.css.DeclarationSetProcessor;
import aurelienribon.ui.css.Property;
import aurelienribon.ui.css.swing.SwingProperties;
import javax.swing.JComponent;
import javax.swing.border.Border;

* @author Aurelien Ribon |
public class JComponentProcessor implements DeclarationSetProcessor<JComponent>, SwingProperties {
  public void process(JComponent t, DeclarationSet ds) {
    Property p;

    p = opaque; if (ds.contains(p)) t.setOpaque(ds.getValue(p, Boolean.class));
    p = tooltip; if (ds.contains(p)) t.setToolTipText(ds.getValue(p, String.class));
    p = border; if (ds.contains(p)) t.setBorder(ds.getValue(p, Border.class));

Related Classes of aurelienribon.ui.css.swing.processors.JComponentProcessor

Copyright © 2018 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