Package org.apache.isis.viewer.dnd.view.content

Examples of org.apache.isis.viewer.dnd.view.content.TextParseableContent


    @Override
    protected void pasteFromClipboard() {
        try {
            final String text = (String) getViewManager().getClipboard(String.class);
            final TextParseableContent content = (TextParseableContent) getContent();
            content.parseTextEntry(text);
            content.entryComplete();
            LOG.debug("pasted " + text);
        } catch (final Throwable e) {
            LOG.error("invalid paste operation " + e);
        }
    }
View Full Code Here


        }
    }

    @Override
    protected Consent canClear() {
        final TextParseableContent field = (TextParseableContent) getContent();
        return field.canClear();
    }
View Full Code Here

    }

    @Override
    protected void clear() {
        try {
            final TextParseableContent content = (TextParseableContent) getContent();
            content.parseTextEntry("");
            content.entryComplete();
            LOG.debug("cleared");
        } catch (final Throwable e) {
            LOG.error("invalid paste operation " + e);
        }
    }
View Full Code Here

        }
    }

    @Override
    protected void copyToClipboard() {
        final TextParseableContent content = (TextParseableContent) getContent();
        final ObjectAdapter object = content.getAdapter();
        if (object != null) {
            final String text = object.titleString();
            getViewManager().setClipboard(text, String.class);
            LOG.debug("copied " + text);
        }
View Full Code Here

        }
    }

    @Override
    public boolean isEmpty() {
        final TextParseableContent content = (TextParseableContent) getContent();
        return content.isEmpty();
    }
View Full Code Here

        return content.isEmpty();
    }

    @Override
    public Consent canChangeValue() {
        final TextParseableContent cont = (TextParseableContent) getContent();
        return cont.isEditable();
    }
View Full Code Here

    protected void saveValue(final ObjectAdapter value) {
        parseEntry(value.titleString());
    }

    protected void parseEntry(final String entryText) {
        final TextParseableContent content = (TextParseableContent) getContent();
        content.parseTextEntry(entryText);
        content.entryComplete();
    }
View Full Code Here

        super(name);
        this.field = field;
    }

    protected ObjectAdapter getValue(final View view) {
        final TextParseableContent vc = (TextParseableContent) view.getContent();
        final ObjectAdapter value = vc.getAdapter();
        return value;
    }
View Full Code Here

    public int getBaseline() {
        return VPADDING + Toolkit.getText(ColorsAndFonts.TEXT_NORMAL).getAscent();
    }

    int getColor() {
        final TextParseableContent content = ((TextParseableContent) getContent());
        final ColorValueFacet col = content.getSpecification().getFacet(ColorValueFacet.class);
        return col.colorValue(content.getAdapter());
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.view.content.TextParseableContent

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.