Package org.noos.xing.yasaf.plaf.action

Examples of org.noos.xing.yasaf.plaf.action.DynamicAction


    protected Component initComponent() {
        MatrixPanel panel = new MatrixPanel(3, 2);

        // Left
        panel.addEntry(0, 0, "enabled : ", enabledBox = new JCheckBox());
        enabledBox.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "enabled",
                new ViewContextSource(viewContext, ToolWindowTypeDescriptor.class),
                new ChecBoxSelectionSource(enabledBox)));

        panel.addEntry(1, 0, "animating : ", animating = new JCheckBox());
        animating.setSelected(true);
        animating.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "animating",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(animating)));

        panel.addEntry(2, 0, "idVisibleOnTitleBar : ", idVisibleOnTitleBar = new JCheckBox());
        idVisibleOnTitleBar.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "idVisibleOnTitleBar",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(idVisibleOnTitleBar)));

        // Right
        panel.add(new JLabel("transparentMode : "), "5,1,r,c");
        panel.add(transparentMode = new JCheckBox(), "7,1,FULL,FULL");
        transparentMode.setAction(new DynamicAction(FloatingLiveTypeDescriptor.class,
                "transparentMode",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(transparentMode)));

        panel.add(new JLabel("transparentDelay : "), "5,3,r,c");
View Full Code Here


            MatrixPanel panel = new MatrixPanel(6, 2);
            panel.setBorder(new TitledBorder("ToolWindowManagerDescriptor Preference"));

            // Column 0
            panel.addEntry(0, 0, "numberingEnabled : ", numberingEnabled = new JCheckBox());
            numberingEnabled.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                         "numberingEnabled",
                                                         new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                         new ChecBoxSelectionSource(numberingEnabled)));

            panel.addEntry(1, 0, "previewEnabled : ", previewEnabled = new JCheckBox());
            previewEnabled.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                       "previewEnabled",
                                                       new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                       new ChecBoxSelectionSource(previewEnabled)));

            panel.addEntry(2, 0, "DividerSize (LEFT) : ",
                           leftDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
            leftDividerSize.addChangeListener(
                    new ChangeListenerAction(ToolWindowBar.class,
                                             "setDividerSize",
                                             new ViewContextSource(viewContext, ToolBarKey.LEFT_TOOLBAR),
                                             new SpinnerValueSource(leftDividerSize)
                    )
            );

            panel.addEntry(3, 0, "DividerSize (RIGHT) : ",
                           rightDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
            rightDividerSize.addChangeListener(
                    new ChangeListenerAction(ToolWindowBar.class,
                                             "setDividerSize",
                                             new ViewContextSource(viewContext, ToolBarKey.RIGHT_TOOLBAR),
                                             new SpinnerValueSource(rightDividerSize)
                    )
            );

            panel.addEntry(4, 0, "DividerSize (TOP) : ",
                           topDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
            topDividerSize.addChangeListener(
                    new ChangeListenerAction(ToolWindowBar.class,
                                             "setDividerSize",
                                             new ViewContextSource(viewContext, ToolBarKey.TOP_TOOLBAR),
                                             new SpinnerValueSource(topDividerSize)
                    )
            );

            panel.addEntry(5, 0, "DividerSize (BOTTOM) : ",
                           bottomDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
            bottomDividerSize.addChangeListener(
                    new ChangeListenerAction(ToolWindowBar.class,
                                             "setDividerSize",
                                             new ViewContextSource(viewContext, ToolBarKey.BOTTOM_TOOLBAR),
                                             new SpinnerValueSource(bottomDividerSize)
                    )
            );

            // Column 1
            pushAwayMode = new JComboBox(new Object[]{
                    PushAwayMode.ANTICLOCKWISE,
                    PushAwayMode.HORIZONTAL,
                    PushAwayMode.VERTICAL,
                    PushAwayMode.MOST_RECENT
            });
            pushAwayMode.addItemListener(new ItemListener() {
                public void itemStateChanged(ItemEvent e) {
                    viewContext.put(PushAwayMode.class, e.getItem());
                }
            });
            panel.addEntry(0, 1, "pushAwayMode : ", pushAwayMode);

            panel.addEntry(1, 1, "showUnavailableTools : ", showUnavailableTools = new JCheckBox());
            showUnavailableTools.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                             "showUnavailableTools",
                                                             new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                             new ChecBoxSelectionSource(showUnavailableTools)));

            panel.addEntry(2, 1, "Agg Mode (LEFT) : ", leftAggregateMode = new JCheckBox());
            leftAggregateMode.setAction(new DynamicAction(ToolWindowBar.class,
                                                          "setAggregateMode",
                                                          new ViewContextSource(viewContext, ToolBarKey.LEFT_TOOLBAR),
                                                                  new ChecBoxSelectionSource(leftAggregateMode)
            ));

            panel.addEntry(3, 1, "Agg Mode (RIGHT) : ", rightAggregateMode = new JCheckBox());
            rightAggregateMode.setAction(new DynamicAction(ToolWindowBar.class,
                                                           "setAggregateMode",
                                                           new ViewContextSource(viewContext, ToolBarKey.RIGHT_TOOLBAR),
                                                                   new ChecBoxSelectionSource(rightAggregateMode)
            ));


            panel.addEntry(4, 1, "Agg Mode (TOP) : ", topAggregateMode = new JCheckBox());
            topAggregateMode.setAction(new DynamicAction(ToolWindowBar.class,
                                                         "setAggregateMode",
                                                         new ViewContextSource(viewContext, ToolBarKey.TOP_TOOLBAR),
                                                                 new ChecBoxSelectionSource(topAggregateMode)
            ));


            panel.addEntry(5, 1, "Agg Mode (BOTTOM) : ", bottomAggregateMode = new JCheckBox());
            bottomAggregateMode.setAction(new DynamicAction(ToolWindowBar.class,
                                                            "setAggregateMode",
                                                            new ViewContextSource(viewContext, ToolBarKey.BOTTOM_TOOLBAR),
                                                                    new ChecBoxSelectionSource(topAggregateMode)
            ));
View Full Code Here

        MatrixPanel panel = new MatrixPanel(4, 2);

        // Left
        panel.add(new JLabel("popupMenuEnabled : "), "1,1,r,c");
        panel.add(popupMenuEnabled = new JCheckBox(), "3,1,FULL,FULL");
        popupMenuEnabled.setAction(new DynamicAction(DockedTypeDescriptor.class,
                "popupMenuEnabled",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(popupMenuEnabled)));

        panel.add(new JLabel("hideRepresentativeButtonOnVisible : "), "1,3,r,c");
        panel.add(hideLabelOnVisible = new JCheckBox(), "3,3,FULL,FULL");
        hideLabelOnVisible.setAction(new DynamicAction(DockedTypeDescriptor.class,
                "hideRepresentativeButtonOnVisible",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(hideLabelOnVisible)));

        panel.add(new JLabel("idVisibleOnTitleBar : "), "1,5,r,c");
        panel.add(idVisibleOnTitleBar = new JCheckBox(), "3,5,FULL,FULL");
        idVisibleOnTitleBar.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "idVisibleOnTitleBar",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(idVisibleOnTitleBar)));

        panel.add(new JLabel("dockLength : "), "1,7,r,c");
        panel.add(dockLength = new JSpinner(new SpinnerNumberModel(100, 100, 400, 10)), "3,7,FULL,FULL");
        dockLength.addChangeListener(
                new ChangeListenerAction(DockedTypeDescriptor.class,
                        "dockLength",
                        new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                        new SpinnerValueSource(dockLength))
        );

        // Right
        panel.add(new JLabel("previewEnabled : "), "5,1,r,c");
        panel.add(previewEnabled = new JCheckBox(), "7,1,FULL,FULL");
        previewEnabled.setAction(new DynamicAction(DockedTypeDescriptor.class,
                "previewEnabled",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(previewEnabled)));

        panel.add(new JLabel("previewDelay : "), "5,3,r,c");
        panel.add(previewDelay = new JSpinner(new SpinnerNumberModel(0, 0, 5000, 500)), "7,3,FULL,FULL");
        previewDelay.addChangeListener(
                new ChangeListenerAction(DockedTypeDescriptor.class,
                        "previewDelay",
                        new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                        new SpinnerValueSource(previewDelay))
        );

        panel.add(new JLabel("previewTransparentRatio : "), "5,5,r,c");
        panel.add(previewTransparentRatio = new JSpinner(new SpinnerNumberModel(0.0, 0.0, 1.0, 0.05)), "7,5,FULL,FULL");
        previewTransparentRatio.addChangeListener(
                new ChangeListenerAction(DockedTypeDescriptor.class,
                        "previewTransparentRatio",
                        new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                        new ToFloatSource(new SpinnerValueSource(previewTransparentRatio)))
        );

        panel.addEntry(3, 1, "animating : ", animating = new JCheckBox());
        animating.setSelected(true);
        animating.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "animating",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(animating)));
        return panel;
    }
View Full Code Here

    protected Component initComponent() {
        MatrixPanel panel = new MatrixPanel(3, 2);

        panel.addEntry(0, 0, "enabled : ", enabled = new JCheckBox());
        enabled.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "enabled",
                new ViewContextSource(viewContext, ToolWindowTypeDescriptor.class),
                new ChecBoxSelectionSource(enabled)));

        panel.addEntry(1, 0, "animating : ", animating = new JCheckBox());
        animating.setSelected(true);
        animating.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "animating",
                new ViewContextSource(viewContext, SlidingTypeDescriptor.class),
                new ChecBoxSelectionSource(animating)));

        panel.addEntry(2, 0, "idVisibleOnTitleBar : ", idVisibleOnTitleBar = new JCheckBox());
        idVisibleOnTitleBar.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "idVisibleOnTitleBar",
                new ViewContextSource(viewContext, SlidingTypeDescriptor.class),
                new ChecBoxSelectionSource(idVisibleOnTitleBar)));


        panel.addEntry(0, 1, "transparentMode : ", transparentMode = new JCheckBox());
        transparentMode.setAction(new DynamicAction(SlidingTypeDescriptor.class,
                "transparentMode",
                new ViewContextSource(viewContext, SlidingTypeDescriptor.class),
                new ChecBoxSelectionSource(transparentMode)));

        panel.addEntry(1, 1, "transparentRatio : ", transparentRatio = new JSpinner(new SpinnerNumberModel(0.0, 0.0, 1.0, 0.05)));
View Full Code Here

    protected Component initComponent() {
        MatrixPanel panel = new MatrixPanel(4, 2);

        // Left
        panel.addEntry(0, 0, "enabled : ", enabledBox = new JCheckBox());
        enabledBox.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "enabled",
                new ViewContextSource(viewContext, ToolWindowTypeDescriptor.class),
                new ChecBoxSelectionSource(enabledBox)));

        panel.addEntry(1, 0, "modal : ", modal = new JCheckBox());
        modal.setAction(new DynamicAction(FloatingTypeDescriptor.class,
                "modal",
                new ViewContextSource(viewContext, FloatingTypeDescriptor.class),
                new ChecBoxSelectionSource(modal)));

        panel.addEntry(2, 0, "animating : ", animating = new JCheckBox());
        animating.setSelected(true);
        animating.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "animating",
                new ViewContextSource(viewContext, FloatingTypeDescriptor.class),
                new ChecBoxSelectionSource(animating)));

        panel.addEntry(3, 0, "idVisibleOnTitleBar : ", idVisibleOnTitleBar = new JCheckBox());
        idVisibleOnTitleBar.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "idVisibleOnTitleBar",
                new ViewContextSource(viewContext, FloatingTypeDescriptor.class),
                new ChecBoxSelectionSource(idVisibleOnTitleBar)));

        // Right
        panel.add(new JLabel("transparentMode : "), "5,1,r,c");
        panel.add(transparentMode = new JCheckBox(), "7,1,FULL,FULL");
        transparentMode.setAction(new DynamicAction(FloatingTypeDescriptor.class,
                "transparentMode",
                new ViewContextSource(viewContext, FloatingTypeDescriptor.class),
                new ChecBoxSelectionSource(transparentMode)));

        panel.add(new JLabel("transparentDelay : "), "5,3,r,c");
        panel.add(transparentDelay = new JSpinner(new SpinnerNumberModel(0, 0, 5000, 500)), "7,3,FULL,FULL");
        transparentDelay.addChangeListener(
                new ChangeListenerAction(FloatingTypeDescriptor.class,
                        "transparentDelay",
                        new ViewContextSource(viewContext, FloatingTypeDescriptor.class),
                        new SpinnerValueSource(transparentDelay))
        );

        panel.add(new JLabel("transparentRatio : "), "5,5,r,c");
        panel.add(transparentRatio = new JSpinner(new SpinnerNumberModel(0.0, 0.0, 1.0, 0.05)), "7,5,FULL,FULL");
        transparentRatio.addChangeListener(
                new ChangeListenerAction(FloatingTypeDescriptor.class,
                        "transparentRatio",
                        new ViewContextSource(viewContext, FloatingTypeDescriptor.class),
                        new ToFloatSource(new SpinnerValueSource(transparentRatio)))
        );

        panel.addEntry(3, 1, "addToTaskBar : ", addToTaskBar = new JCheckBox());
        addToTaskBar.setAction(new DynamicAction(FloatingTypeDescriptor.class,
                "addToTaskBar",
                new ViewContextSource(viewContext, FloatingTypeDescriptor.class),
                new ChecBoxSelectionSource(addToTaskBar)));

        return panel;
View Full Code Here

    protected Component initComponent() {
        MatrixPanel panel = new MatrixPanel(3, 2);

        // Left
        panel.addEntry(0, 0, "enabled : ", enabledBox = new JCheckBox());
        enabledBox.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "enabled",
                new ViewContextSource(viewContext, ToolWindowTypeDescriptor.class),
                new ChecBoxSelectionSource(enabledBox)));

        panel.addEntry(1, 0, "animating : ", animating = new JCheckBox());
        animating.setSelected(true);
        animating.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "animating",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(animating)));

        panel.addEntry(2, 0, "idVisibleOnTitleBar : ", idVisibleOnTitleBar = new JCheckBox());
        idVisibleOnTitleBar.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "idVisibleOnTitleBar",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(idVisibleOnTitleBar)));

        // Right
        panel.add(new JLabel("transparentMode : "), "5,1,r,c");
        panel.add(transparentMode = new JCheckBox(), "7,1,FULL,FULL");
        transparentMode.setAction(new DynamicAction(FloatingLiveTypeDescriptor.class,
                "transparentMode",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(transparentMode)));

        panel.add(new JLabel("transparentDelay : "), "5,3,r,c");
View Full Code Here

            MatrixPanel panel = new MatrixPanel(6, 2);
            panel.setBorder(new TitledBorder("ToolWindowManagerDescriptor Preference"));

            // Column 0
            panel.addEntry(0, 0, "numberingEnabled : ", numberingEnabled = new JCheckBox());
            numberingEnabled.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                         "numberingEnabled",
                                                         new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                         new ChecBoxSelectionSource(numberingEnabled)));

            panel.addEntry(1, 0, "previewEnabled : ", previewEnabled = new JCheckBox());
            previewEnabled.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                       "previewEnabled",
                                                       new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                       new ChecBoxSelectionSource(previewEnabled)));

            panel.addEntry(2, 0, "DividerSize (LEFT) : ",
                           leftDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
            leftDividerSize.addChangeListener(
                    new ChangeListenerAction(ToolWindowManagerDescriptor.class,
                                             "setDividerSize",
                                             new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                             new AndSource(
                                                     new ConstantSource(ToolWindowAnchor.LEFT),
                                                     new SpinnerValueSource(leftDividerSize)
                                             )
                    )
            );

            panel.addEntry(3, 0, "DividerSize (RIGHT) : ",
                           rightDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
            rightDividerSize.addChangeListener(
                    new ChangeListenerAction(ToolWindowManagerDescriptor.class,
                                             "setDividerSize",
                                             new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                             new AndSource(
                                                     new ConstantSource(ToolWindowAnchor.RIGHT),
                                                     new SpinnerValueSource(rightDividerSize)
                                             )
                    )
            );

            panel.addEntry(4, 0, "DividerSize (TOP) : ",
                           topDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
            topDividerSize.addChangeListener(
                    new ChangeListenerAction(ToolWindowManagerDescriptor.class,
                                             "setDividerSize",
                                             new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                             new AndSource(
                                                     new ConstantSource(ToolWindowAnchor.TOP),
                                                     new SpinnerValueSource(topDividerSize)
                                             )
                    )
            );

            panel.addEntry(5, 0, "DividerSize (BOTTOM) : ",
                           bottomDividerSize = new JSpinner(new SpinnerNumberModel(5, 0, 20, 1)));
            bottomDividerSize.addChangeListener(
                    new ChangeListenerAction(ToolWindowManagerDescriptor.class,
                                             "setDividerSize",
                                             new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                             new AndSource(
                                                     new ConstantSource(ToolWindowAnchor.BOTTOM),
                                                     new SpinnerValueSource(bottomDividerSize)
                                             )
                    )
            );

            // Column 1
            pushAwayMode = new JComboBox(new Object[]{
                    PushAwayMode.ANTICLOCKWISE,
                    PushAwayMode.HORIZONTAL,
                    PushAwayMode.VERTICAL,
                    PushAwayMode.MOST_RECENT
            });
            pushAwayMode.addItemListener(new ItemListener() {
                public void itemStateChanged(ItemEvent e) {
                    viewContext.put(PushAwayMode.class, e.getItem());
                }
            });
            panel.addEntry(0, 1, "pushAwayMode : ", pushAwayMode);

            panel.addEntry(1, 1, "showUnavailableTools : ", showUnavailableTools = new JCheckBox());
            showUnavailableTools.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                             "showUnavailableTools",
                                                             new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                             new ChecBoxSelectionSource(showUnavailableTools)));

            panel.addEntry(2, 1, "Agg Mode (LEFT) : ", leftAggregateMode = new JCheckBox());
            leftAggregateMode.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                          "setAggregateMode",
                                                          new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                          new AndSource(
                                                                  new ConstantSource(ToolWindowAnchor.LEFT),
                                                                  new ChecBoxSelectionSource(leftAggregateMode)
                                                          )
            ));

            panel.addEntry(3, 1, "Agg Mode (RIGHT) : ", rightAggregateMode = new JCheckBox());
            rightAggregateMode.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                           "setAggregateMode",
                                                           new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                           new AndSource(
                                                                   new ConstantSource(ToolWindowAnchor.RIGHT),
                                                                   new ChecBoxSelectionSource(rightAggregateMode)
                                                           )
            ));


            panel.addEntry(4, 1, "Agg Mode (TOP) : ", topAggregateMode = new JCheckBox());
            topAggregateMode.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                         "setAggregateMode",
                                                         new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                         new AndSource(
                                                                 new ConstantSource(ToolWindowAnchor.TOP),
                                                                 new ChecBoxSelectionSource(topAggregateMode)
                                                         )
            ));


            panel.addEntry(5, 1, "Agg Mode (BOTTOM) : ", bottomAggregateMode = new JCheckBox());
            bottomAggregateMode.setAction(new DynamicAction(ToolWindowManagerDescriptor.class,
                                                            "setAggregateMode",
                                                            new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                                            new AndSource(
                                                                    new ConstantSource(ToolWindowAnchor.BOTTOM),
                                                                    new ChecBoxSelectionSource(topAggregateMode)
View Full Code Here

    protected Component initComponent() {
        MatrixPanel panel = new MatrixPanel(3, 2);

        // Left
        panel.addEntry(0, 0, "enabled : ", enabledBox = new JCheckBox());
        enabledBox.setAction(new DynamicAction(FloatingLiveTypeDescriptor.class,
                "enabled",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(enabledBox)));

        panel.addEntry(1, 0, "animating : ", animating = new JCheckBox());
        animating.setSelected(true);
        animating.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "animating",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(animating)));

        panel.addEntry(2, 0, "idVisibleOnTitleBar : ", idVisibleOnTitleBar = new JCheckBox());
        idVisibleOnTitleBar.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "idVisibleOnTitleBar",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(idVisibleOnTitleBar)));

        // Right
        panel.add(new JLabel("transparentMode : "), "5,1,r,c");
        panel.add(transparentMode = new JCheckBox(), "7,1,FULL,FULL");
        transparentMode.setAction(new DynamicAction(FloatingLiveTypeDescriptor.class,
                "transparentMode",
                new ViewContextSource(viewContext, FloatingLiveTypeDescriptor.class),
                new ChecBoxSelectionSource(transparentMode)));

        panel.add(new JLabel("transparentDelay : "), "5,3,r,c");
View Full Code Here

        MatrixPanel panel = new MatrixPanel(4, 2);

        // Left
        panel.add(new JLabel("popupMenuEnabled : "), "1,1,r,c");
        panel.add(popupMenuEnabled = new JCheckBox(), "3,1,FULL,FULL");
        popupMenuEnabled.setAction(new DynamicAction(DockedTypeDescriptor.class,
                "popupMenuEnabled",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(popupMenuEnabled)));

        panel.add(new JLabel("hideRepresentativeButtonOnVisible : "), "1,3,r,c");
        panel.add(hideLabelOnVisible = new JCheckBox(), "3,3,FULL,FULL");
        hideLabelOnVisible.setAction(new DynamicAction(DockedTypeDescriptor.class,
                "hideRepresentativeButtonOnVisible",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(hideLabelOnVisible)));

        panel.add(new JLabel("idVisibleOnTitleBar : "), "1,5,r,c");
        panel.add(idVisibleOnTitleBar = new JCheckBox(), "3,5,FULL,FULL");
        idVisibleOnTitleBar.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "idVisibleOnTitleBar",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(idVisibleOnTitleBar)));

        panel.add(new JLabel("dockLength : "), "1,7,r,c");
        panel.add(dockLength = new JSpinner(new SpinnerNumberModel(100, 100, 400, 10)), "3,7,FULL,FULL");
        dockLength.addChangeListener(
                new ChangeListenerAction(DockedTypeDescriptor.class,
                        "dockLength",
                        new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                        new SpinnerValueSource(dockLength))
        );

        // Right
        panel.add(new JLabel("previewEnabled : "), "5,1,r,c");
        panel.add(previewEnabled = new JCheckBox(), "7,1,FULL,FULL");
        previewEnabled.setAction(new DynamicAction(DockedTypeDescriptor.class,
                "previewEnabled",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(previewEnabled)));

        panel.add(new JLabel("previewDelay : "), "5,3,r,c");
        panel.add(previewDelay = new JSpinner(new SpinnerNumberModel(0, 0, 5000, 500)), "7,3,FULL,FULL");
        previewDelay.addChangeListener(
                new ChangeListenerAction(DockedTypeDescriptor.class,
                        "previewDelay",
                        new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                        new SpinnerValueSource(previewDelay))
        );

        panel.add(new JLabel("previewTransparentRatio : "), "5,5,r,c");
        panel.add(previewTransparentRatio = new JSpinner(new SpinnerNumberModel(0.0, 0.0, 1.0, 0.05)), "7,5,FULL,FULL");
        previewTransparentRatio.addChangeListener(
                new ChangeListenerAction(DockedTypeDescriptor.class,
                        "previewTransparentRatio",
                        new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                        new ToFloatSource(new SpinnerValueSource(previewTransparentRatio)))
        );

        panel.addEntry(3, 1, "animating : ", animating = new JCheckBox());
        animating.setSelected(true);
        animating.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "animating",
                new ViewContextSource(viewContext, DockedTypeDescriptor.class),
                new ChecBoxSelectionSource(animating)));
        return panel;
    }
View Full Code Here

    protected Component initComponent() {
        MatrixPanel panel = new MatrixPanel(3, 2);

        panel.addEntry(0, 0, "enabled : ", enabled = new JCheckBox());
        enabled.setAction(new DynamicAction(SlidingTypeDescriptor.class,
                "enabled",
                new ViewContextSource(viewContext, SlidingTypeDescriptor.class),
                new ChecBoxSelectionSource(enabled)));

        panel.addEntry(1, 0, "animating : ", animating = new JCheckBox());
        animating.setSelected(true);
        animating.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "animating",
                new ViewContextSource(viewContext, SlidingTypeDescriptor.class),
                new ChecBoxSelectionSource(animating)));

        panel.addEntry(2, 0, "idVisibleOnTitleBar : ", idVisibleOnTitleBar = new JCheckBox());
        idVisibleOnTitleBar.setAction(new DynamicAction(ToolWindowTypeDescriptor.class,
                "idVisibleOnTitleBar",
                new ViewContextSource(viewContext, SlidingTypeDescriptor.class),
                new ChecBoxSelectionSource(idVisibleOnTitleBar)));


        panel.addEntry(0, 1, "transparentMode : ", transparentMode = new JCheckBox());
        transparentMode.setAction(new DynamicAction(SlidingTypeDescriptor.class,
                "transparentMode",
                new ViewContextSource(viewContext, SlidingTypeDescriptor.class),
                new ChecBoxSelectionSource(transparentMode)));

        panel.addEntry(1, 1, "transparentRatio : ", transparentRatio = new JSpinner(new SpinnerNumberModel(0.0, 0.0, 1.0, 0.05)));
View Full Code Here

TOP

Related Classes of org.noos.xing.yasaf.plaf.action.DynamicAction

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.