Package org.noos.xing.yasaf.plaf.component

Examples of org.noos.xing.yasaf.plaf.component.ToolBarContentPanel


                return c;
            }
        });
        indexColumn.setCellEditor(new DefaultCellEditor(indexs));

        ToolBarContentPanel toolBarContentPanel = new ToolBarContentPanel(new JScrollPane(toolsTable));
        toolBarContentPanel.setBorder(new TitledBorder("ToolWindows"));
        toolBarContentPanel.getToolBar().add(new ViewContextAction("Remove All",
                                                                   viewContext,
                                                                   "removeAll"));

        return toolBarContentPanel;
    }
View Full Code Here


            booleanEditor.setHorizontalAlignment(SwingConstants.CENTER);

            groupsTable.getColumnModel().getColumn(1).setCellRenderer(new CheckBoxCellRenderer());
            groupsTable.getColumnModel().getColumn(1).setCellEditor(new DefaultCellEditor(booleanEditor));

            ToolBarContentPanel panel = new ToolBarContentPanel(new JScrollPane(groupsTable));
            panel.setBorder(new TitledBorder("Groups"));

            panel.getToolBar().add(new ViewContextAction("Add", viewContext, GroupKeySpace.ADD_GROUP));
            panel.getToolBar().add(new ViewContextAction("Remove", null, viewContext, GroupKeySpace.REMOVE_GROUP,
                                                         ToolWindowGroup.class));
            panel.getToolBar().add(new ViewContextAction("Show", null, viewContext, GroupKeySpace.SHOW_GROUP,
                                                         ToolWindowGroup.class));
            panel.getToolBar().add(new ViewContextAction("Hide", null, viewContext, GroupKeySpace.HIDE_GROUP,
                                                         ToolWindowGroup.class));

            return panel;
        }
View Full Code Here

    protected Component initComponent() {
        textArea = new JTextArea();
        viewContext.put(Document.class, textArea.getDocument());

        ToolBarContentPanel recordindPanel = new ToolBarContentPanel(new JScrollPane(textArea));
        recordindPanel.setBorder(new TitledBorder("Test Recording."));
        recordindPanel.getToolBar().add(
                new ActionEnabler(new ViewContextAction("Start", viewContext, "start"), viewContext, Tracer.class){
                    public void contextChange(ViewContextChangeEvent evt) {
                        action.setEnabled(evt.getNewValue() == null);
                    }
                }.getAction()
        );
        recordindPanel.getToolBar().add(new ViewContextAction("Stop", null, viewContext, "stop",
                                                              Tracer.class));
        recordindPanel.getToolBar().add(new ViewContextAction("Clear", viewContext, "clear"));

        return recordindPanel;
    }
View Full Code Here

            toolsInGroupTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            toolsInGroupTable.getSelectionModel().addListSelectionListener(
                    new ContextPutListSelectionListener(viewContext, GroupKeySpace.TOOL_IN_GROUP_ID, toolsInGroupTable, 0)
            );

            ToolBarContentPanel panel = new ToolBarContentPanel(new JScrollPane(toolsInGroupTable));
            panel.setBorder(new TitledBorder("Tools In"));

            JComboBox tools = new JComboBox(new ToolsComboBoxModel(viewContext));
            tools.addItemListener(new ContextPutItemListener(viewContext, GroupKeySpace.TOOL_ID));

            panel.getToolBar().add(tools);
            panel.getToolBar().add(new ViewContextAction("Add", null, viewContext, GroupKeySpace.ADD_TOOL,
                                                         ToolWindowGroup.class));
            panel.getToolBar().add(new ViewContextAction("Remove", null, viewContext, GroupKeySpace.REMOVE_TOOL,
                                                         GroupKeySpace.TOOL_IN_GROUP_ID));

            return panel;
        }
View Full Code Here

            booleanEditor.setHorizontalAlignment(SwingConstants.CENTER);

            groupsTable.getColumnModel().getColumn(1).setCellRenderer(new CheckBoxCellRenderer());
            groupsTable.getColumnModel().getColumn(1).setCellEditor(new DefaultCellEditor(booleanEditor));

            ToolBarContentPanel panel = new ToolBarContentPanel(new JScrollPane(groupsTable));
            panel.setBorder(new TitledBorder("Groups"));

            panel.getToolBar().add(new ViewContextAction("Add", viewContext, GroupKeySpace.ADD_GROUP));
            panel.getToolBar().add(new ViewContextAction("Remove", null, viewContext, GroupKeySpace.REMOVE_GROUP,
                                                         ToolWindowGroup.class));
            panel.getToolBar().add(new ViewContextAction("Show", null, viewContext, GroupKeySpace.SHOW_GROUP,
                                                         ToolWindowGroup.class));
            panel.getToolBar().add(new ViewContextAction("Hide", null, viewContext, GroupKeySpace.HIDE_GROUP,
                                                         ToolWindowGroup.class));

            return panel;
        }
View Full Code Here

            toolsInGroupTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            toolsInGroupTable.getSelectionModel().addListSelectionListener(
                    new ContextPutListSelectionListener(viewContext, GroupKeySpace.TOOL_IN_GROUP_ID, toolsInGroupTable, 0)
            );

            ToolBarContentPanel panel = new ToolBarContentPanel(new JScrollPane(toolsInGroupTable));
            panel.setBorder(new TitledBorder("Tools In"));

            JComboBox tools = new JComboBox(new ToolsComboBoxModel(viewContext));
            tools.addItemListener(new ContextPutItemListener(viewContext, GroupKeySpace.TOOL_ID));

            panel.getToolBar().add(tools);
            panel.getToolBar().add(new ViewContextAction("Add", null, viewContext, GroupKeySpace.ADD_TOOL,
                                                         ToolWindowGroup.class));
            panel.getToolBar().add(new ViewContextAction("Remove", null, viewContext, GroupKeySpace.REMOVE_TOOL,
                                                         GroupKeySpace.TOOL_IN_GROUP_ID));

            return panel;
        }
View Full Code Here

TOP

Related Classes of org.noos.xing.yasaf.plaf.component.ToolBarContentPanel

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.