Package open.dolphin.ui

Examples of open.dolphin.ui.MyJPopupMenu


        this.setPreferredSize(dim);
        this.setMinimumSize(dim);
        this.setMaximumSize(dim);
       
        // Embed popup menu
        appointMenu = new MyJPopupMenu();
        ReflectAction cancelAction = new ReflectAction("取り消し", this, "appointCancel");
        JMenuItem item = new JMenuItem(cancelAction);
        appointMenu.add(item);
                       
        // Table を DragTarget, 自身をリスナに設定する
View Full Code Here


        @Override
        public void maybeShowPopup(MouseEvent e) {
           
            if (e.isPopupTrigger()) {
               
                final MyJPopupMenu contextMenu = new MyJPopupMenu();
               
                int row = laboListTable.getTable().rowAtPoint(e.getPoint());
                Object obj = laboListTable.getTableModel().getObject(row);
                int selected = laboListTable.getTable().getSelectedRow();
               
                if (row == selected && obj != null) {
                    String pop1 = ClientContext.getString("watingList.popup.openKarte");
                    contextMenu.add(new JMenuItem(new ReflectAction(pop1, LaboTestImporter.this, "openKarte")));
                    contextMenu.show(e.getComponent(), e.getX(), e.getY());
                }
            }
        }
View Full Code Here

        List<StampTree> allTree = stampBox.getAllPTrees();
        if (allTree == null || allTree.size() == 0) {
            return;
        }
       
        popup = new MyJPopupMenu();
       
        //
        // メニューのスタックを生成する
        //
        LinkedList menus = new LinkedList();
View Full Code Here

            private void mabeShowPopup(MouseEvent e) {
                if (e.isPopupTrigger()) {
//                  isReadOnly対応
                    if (context.isReadOnly()) return;

                    MyJPopupMenu pop = new MyJPopupMenu();
                    JMenuItem item = new JMenuItem("追加");
                    item.setIcon(GUIConst.ICON_LIST_ADD_16);
                    pop.add(item);
                    item.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            new AllergyEditor(AllergyInspector.this);
                        }
                    });
                    final int row = view.getTable().rowAtPoint(e.getPoint());
                    if (tableModel.getObject(row) != null) {
                        pop.add(new JSeparator());
                        JMenuItem item2 = new JMenuItem("削除");
                        item2.setIcon(GUIConst.ICON_LIST_REMOVE_16);
                        pop.add(item2);
                        item2.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent e) {
                                delete(row);
                            }
                        });
                    }
                    pop.show(e.getComponent(), e.getX(), e.getY());
                }
            }
            @Override
            public void mousePressed(MouseEvent e) {
//pns^
View Full Code Here

        }

        private void maybeShowPopup(MouseEvent e) {

            if (e.isPopupTrigger()) {
                popup = new MyJPopupMenu();
                CalendarCardPanel cc = new CalendarCardPanel(ClientContext.getEventColorTable());
                cc.addPropertyChangeListener(CalendarCardPanel.PICKED_DATE, this);
                cc.setCalendarRange(new int[]{-12, 0});
                popup.insert(cc, 0);
                popup.show(e.getComponent(), e.getX(), e.getY());
View Full Code Here

            private void mabeShowPopup(MouseEvent e) {
                if (e.isPopupTrigger()) {
//                  isReadOnly対応
                    if (context.isReadOnly()) return;

                    MyJPopupMenu pop = new MyJPopupMenu();
                    JMenuItem item = new JMenuItem("追加");
                    item.setIcon(GUIConst.ICON_LIST_ADD_16);
                    pop.add(item);
                    item.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                            new PhysicalEditor(PhysicalInspector.this);
                        }
                    });
                    final int row = view.getTable().rowAtPoint(e.getPoint());
                    if (tableModel.getObject(row) != null) {
                        pop.add(new JSeparator());
                        JMenuItem item2 = new JMenuItem("削除");
                        item2.setIcon(GUIConst.ICON_LIST_REMOVE_16);
                        pop.add(item2);
                        item2.addActionListener(new ActionListener() {
                            public void actionPerformed(ActionEvent e) {
                                delete(row);
                            }
                        });
                    }
                    pop.show(e.getComponent(), e.getX(), e.getY());
                }
            }
            @Override
            public void mousePressed(MouseEvent e) {
//pns^
View Full Code Here

        }

        private void maybeShowPopup(MouseEvent e) {

            if (e.isPopupTrigger()) {
                popup = new MyJPopupMenu();
                CalendarCardPanel cc = new CalendarCardPanel(ClientContext.getEventColorTable());
                cc.addPropertyChangeListener(CalendarCardPanel.PICKED_DATE, this);
                cc.setCalendarRange(new int[]{-12, 0});
                popup.insert(cc, 0);
                popup.show(e.getComponent(), e.getX(), e.getY());
View Full Code Here

     */
    private void buildPopupMenu() {
        ActionManager m = new ActionManager(this);
        actionMap = m.getActionMap();
       
        popup = new MyJPopupMenu();
        popup.add(m.getMenuItem("collapseAll", "フォルダを全て閉じる", GUIConst.ICON_TREE_COLLAPSED_16));
        popup.add(m.getMenuItem("expandAll", "フォルダを全て展開する", GUIConst.ICON_TREE_EXPANDED_16));
        popup.addSeparator();
        popup.add(m.getMenuItem("exportUserStampBox", "スタンプをファイルに保存する...", GUIConst.ICON_DISK_16));
        popup.add(m.getMenuItem("importUserStampBox", "スタンプをファイルから読み込む...", GUIConst.ICON_EMPTY_16));
View Full Code Here

        return getTextPane();
    }

    protected MyJPopupMenu createMenus() {

        final MyJPopupMenu contextMenu = new MyJPopupMenu();
       
        // cut, copy, paste メニューを追加する
        contextMenu.add(mediator.getAction(GUIConst.ACTION_CUT));
        contextMenu.add(mediator.getAction(GUIConst.ACTION_COPY));
        contextMenu.add(mediator.getAction(GUIConst.ACTION_PASTE));

        // テキストカラーメニューを追加する
        if (getTextPane().isEditable()) {
            ColorChooserComp ccl = new ColorChooserComp();
            ccl.addPropertyChangeListener(ColorChooserComp.SELECTED_COLOR, new PropertyChangeListener() {

                @Override
                public void propertyChange(PropertyChangeEvent e) {
                    Color selected = (Color) e.getNewValue();
                    Action action = new StyledEditorKit.ForegroundAction("selected", selected);
                    action.actionPerformed(new ActionEvent(getTextPane(), ActionEvent.ACTION_PERFORMED, "foreground"));
                    contextMenu.setVisible(false);
                }
            });
            JLabel l = new JLabel("  カラー:");
            JPanel p = new JPanel(new FlowLayout(FlowLayout.LEFT, 5, 5));
            p.add(l);
            p.add(ccl);
            contextMenu.add(p);
        } else {
            contextMenu.addSeparator();
        }

        // PPane の場合はStampMenuを追加する
        if (getMyRole().equals(IInfoModel.ROLE_P)) {
            //contextMenu.addSeparator();
View Full Code Here

        return contextMenu;
    }

    private void mabeShowPopup(MouseEvent e) {
        if (e.isPopupTrigger()) {
            MyJPopupMenu contextMenu = createMenus();
            contextMenu.show(e.getComponent(), e.getX(), e.getY());
        }
    }
View Full Code Here

TOP

Related Classes of open.dolphin.ui.MyJPopupMenu

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.