Package org.apache.isis.viewer.dnd.toolbar

Examples of org.apache.isis.viewer.dnd.toolbar.ToolbarView


    @Override
    protected void buildView() {
        if (subviews().length == 0) {
            final CalendarGrid grid = new CalendarGrid(getContent());
            final ToolbarView toolbar = createToolbar(grid);
            addView(toolbar);
            addView(grid);
        } else {
            // TODO update grid view
        }
View Full Code Here


            // TODO update grid view
        }
    }

    private ToolbarView createToolbar(final CalendarGrid calendar) {
        final ToolbarView toolbarView = new ToolbarView(getContent(), null);

        toolbarView.addView(new Button(new AbstractButtonAction("+Row") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.addRow();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("-Row") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.removeRow();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Across") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.acrossFirst();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Down") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.downFirst();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Next") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.nextPeriod();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Previous") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.previousePeriod();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Day") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showSingleDay();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Days") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showDays();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Weeks") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showWeeks();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Months") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showMonths();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Years") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showYears();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Today") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.today();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Date") {
            @Override
            public void execute(final Workspace workspace, View view, final Location at) {
                final Content content = new NullContent() {
                };
                view = DatePickerControl.getPicker(content);
View Full Code Here

    @Override
    protected void buildView() {
        if (subviews().length == 0) {
            final CalendarGrid grid = new CalendarGrid(getContent());
            final ToolbarView toolbar = createToolbar(grid);
            addView(toolbar);
            addView(grid);
        } else {
            // TODO update grid view
        }
View Full Code Here

            // TODO update grid view
        }
    }

    private ToolbarView createToolbar(final CalendarGrid calendar) {
        final ToolbarView toolbarView = new ToolbarView(getContent(), null);

        toolbarView.addView(new Button(new AbstractButtonAction("+Row") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.addRow();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("-Row") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.removeRow();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Across") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.acrossFirst();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Down") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.downFirst();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Next") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.nextPeriod();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Previous") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.previousePeriod();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Day") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showSingleDay();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Days") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showDays();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Weeks") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showWeeks();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Months") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showMonths();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Years") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showYears();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Today") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.today();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Date") {
            @Override
            public void execute(final Workspace workspace, View view, final Location at) {
                final Content content = new NullContent() {
                };
                view = DatePickerControl.getPicker(content);
View Full Code Here

    @Override
    protected void buildView() {
        if (subviews().length == 0) {
            final CalendarGrid grid = new CalendarGrid(getContent());
            final ToolbarView toolbar = createToolbar(grid);
            addView(toolbar);
            addView(grid);
        } else {
            // TODO update grid view
        }
View Full Code Here

            // TODO update grid view
        }
    }

    private ToolbarView createToolbar(final CalendarGrid calendar) {
        final ToolbarView toolbarView = new ToolbarView(getContent(), null);

        toolbarView.addView(new Button(new AbstractButtonAction("+Row") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.addRow();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("-Row") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.removeRow();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Across") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.acrossFirst();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Down") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.downFirst();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Next") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.nextPeriod();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Previous") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.previousePeriod();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Day") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showSingleDay();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Days") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showDays();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Weeks") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showWeeks();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Months") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showMonths();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Years") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.showYears();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Today") {
            @Override
            public void execute(final Workspace workspace, final View view, final Location at) {
                calendar.today();
            }
        }, this));

        toolbarView.addView(new Button(new AbstractButtonAction("Date") {
            @Override
            public void execute(final Workspace workspace, View view, final Location at) {
                final Content content = new NullContent() {
                };
                view = DatePickerControl.getPicker(content);
View Full Code Here

TOP

Related Classes of org.apache.isis.viewer.dnd.toolbar.ToolbarView

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.