Package com.palantir.ptoss.util

Examples of com.palantir.ptoss.util.Mutator


*/
public class JComboBoxWiringHarness implements WiringHarness<Bound, Field> {
    public Collection<Binding> wire(Bound bound, BindingContext context, Field field) throws IllegalAccessException, IntrospectionException {
        String target = bound.to();
        JComboBox combo = context.getFieldObject(field, JComboBox.class);
        Mutator mutator = Mutator.create(context, target);
        final String nullValue = (String)Utilities.getNullValue(context, bound.nullValue());
        return ImmutableList.of(bindJComboBox(bound, mutator, combo, nullValue));
    }
View Full Code Here


*/
public class JLabelWiringHarness implements WiringHarness<Bound, Field> {
    public Collection<Binding> wire(Bound bound, BindingContext context, Field field)
            throws IllegalAccessException, IntrospectionException {
        JLabel label = context.getFieldObject(field, JLabel.class);
        Mutator mutator = Mutator.create(context, bound.to());
        return ImmutableList.of(bindJLabel(mutator, label));
    }
View Full Code Here

*/
public class JListWiringHarness implements WiringHarness<Bound, Field> {
    public Collection<Binding> wire(Bound bound, BindingContext context, Field field)
            throws IllegalAccessException, IntrospectionException {
        JList list = context.getFieldObject(field, JList.class);
        Mutator mutator = Mutator.create(context, bound.to());
        return ImmutableList.of(bindJList(bound, mutator, list));
    }
View Full Code Here

* {@link BindableModel}.
*/
public class JSliderWiringHarness implements WiringHarness<Bound, Field> {
    public Collection<Binding> wire(Bound bound, BindingContext context, Field field) throws IllegalAccessException, IntrospectionException {
        String target = bound.to();
        Mutator mutator = Mutator.create(context, target);
        JSlider slider = context.getFieldObject(field, JSlider.class);
        return ImmutableList.of(bindJSlider(mutator, slider));
    }
View Full Code Here

* {@link BindableModel}.
*/
public class JTextComponentWiringHarness implements WiringHarness<Bound, Field> {
    public Collection<Binding> wire(Bound bound, BindingContext context, Field field) throws IllegalAccessException, IntrospectionException {
        JTextComponent textComponent = context.getFieldObject(field, JTextComponent.class);
        Mutator mutator = Mutator.create(context, bound.to());
        Binding binding = bindJTextComponent(mutator, textComponent);
        if (binding == null) {
            return ImmutableList.of();
        }
        return ImmutableList.of(binding);
View Full Code Here

*/
public class AbstractButtonWiringHarness implements WiringHarness<Bound, Field> {

    public Collection<Binding> wire(Bound bound, BindingContext context, Field field)
            throws IllegalAccessException, IntrospectionException {
        Mutator mutator = Mutator.create(context, bound.to());
        AbstractButton abstractButton = context.getFieldObject(field, AbstractButton.class);
        return ImmutableList.of(bindAbstractButton(mutator, abstractButton));
    }
View Full Code Here

            return bindings;
        }

        private static Collection<Binding> wire(BoundSelection bound, BindingContext context, Field field) throws IntrospectionException {
            String target = bound.to();
            Mutator mutator = Mutator.create(context, target);
            if (JList.class.isAssignableFrom(field.getType())) {
                final JList list = context.getFieldObject(field, JList.class);
                return bindJList(bound, mutator, list);
            } else if (JComboBox.class.isAssignableFrom(field.getType())) {
                final JComboBox combo = context.getFieldObject(field, JComboBox.class);
View Full Code Here

*/
public class JToggleButtonWiringHarness implements WiringHarness<Bound, Field> {
    public Collection<Binding> wire(Bound bound, BindingContext context, Field field)
            throws IllegalAccessException, IntrospectionException {
        String target = bound.to();
        Mutator mutator = Mutator.create(context, target);
        JToggleButton toggle = context.getFieldObject(field, JToggleButton.class);

        Class<?>[] paramTypes = mutator.getSetter().getMethod().getParameterTypes();
        if (paramTypes.length == 1 && paramTypes[0].isEnum()) {
            Class<?> enumType = paramTypes[0];
            String value = bound.value();
            return ImmutableList.of(bindJToggleButtonToEnum(value, enumType, mutator, toggle));
        } else if (paramTypes.length == 1 && paramTypes[0] == boolean.class) {
View Full Code Here

TOP

Related Classes of com.palantir.ptoss.util.Mutator

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.