Package org.apache.isis.viewer.dnd

Examples of org.apache.isis.viewer.dnd.ButtonAction


    public static void main(final String[] args) {
        new ButtonExample();
    }

    protected void views(final Workspace workspace) {
        ButtonAction action = new ButtonAction() {

            public Consent disabled(final View view) {
                return Allow.DEFAULT;
            }

            public void execute(final Workspace workspace, final View view, final Location at) {
                view.getFeedbackManager().setAction("Button 1 pressed");
            }

            public String getDescription(final View view) {
                return "Button that can be pressed";
            }

            public ObjectActionType getType() {
                return USER;
            }

            public String getName(final View view) {
                return "Action";
            }

            public boolean isDefault() {
                return true;
            }

            public String getHelp(final View view) {
                return null;
            }
        };

        View view = new Button(action, workspace);
        view.setLocation(new Location(100, 100));
        view.setSize(view.getRequiredSize(new Size()));
        workspace.addView(view);

        ButtonAction action2 = new ButtonAction() {

            public Consent disabled(final View view) {
                return Veto.DEFAULT;
            }
View Full Code Here


    public static void main(final String[] args) {
        new ButtonBorderExample();
    }

    protected void views(final Workspace workspace) {
        ButtonAction[] actions = new ButtonAction[] { new ButtonAction() {

            public Consent disabled(final View view) {
                return Allow.DEFAULT;
            }

            public void execute(final Workspace workspace, final View view, final Location at) {
                view.getFeedbackManager().addMessage("Button 1 pressed");
            }

            public String getDescription(final View view) {
                return "Button that can be pressed";
            }

            public String getName(final View view) {
                return "Action";
            }

            public ObjectActionType getType() {
                return USER;
            }

            public boolean isDefault() {
                return true;
            }

            public String getHelp(final View view) {
                return null;
            }
        },

        new ButtonAction() {

            public Consent disabled(final View view) {
                return Veto.DEFAULT;
            }
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.ButtonAction

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.