Package org.noos.xing.yasaf.plaf.bean

Examples of org.noos.xing.yasaf.plaf.bean.ConstantSource


            leftDividerSize.addChangeListener(
                    new ChangeListenerAction(ToolWindowManagerDescriptor.class,
                                             "setDividerSize",
                                             new ViewContextSource(viewContext, ToolWindowManagerDescriptor.class),
                                             new AndSource(
                                                     new ConstantSource(ToolWindowAnchor.LEFT),
                                                     new SpinnerValueSource(leftDividerSize)
                                             )
                    )
            );

            panel.addPair(1, 1,
                          "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.addPair(1, 2,
                          "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.addPair(1, 3,
                          "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)
                                             )
                    )
            );
View Full Code Here


            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)
                                                            )
            ));

            return panel;
View Full Code Here

            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, "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(2, 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(3, 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(4, 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)
                                                            )
            ));

            return panel;
View Full Code Here

TOP

Related Classes of org.noos.xing.yasaf.plaf.bean.ConstantSource

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.