Package aurelienribon.ui.css.swing.processors

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

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

/**
* @author Aurelien Ribon | http://www.aurelienribon.com/
*/
public class JTextAreaProcessor implements DeclarationSetProcessor<JTextArea>, SwingProperties {
  @Override
  public void process(JTextArea t, DeclarationSet ds) {
    Property p;

    p = lineWrap; if (ds.contains(p)) t.setLineWrap(ds.getValue(p, Boolean.class));
    p = wrapStyleWord; if (ds.contains(p)) t.setWrapStyleWord(ds.getValue(p, Boolean.class));
    p = tabSize; if (ds.contains(p)) t.setTabSize(ds.getValue(p, Integer.class));
  }
}
TOP

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

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.