Logo Search packages:      
Sourcecode: javamorph version File versions  Download package

javamorph::CPopupMenuDecorator::CPopupMenuDecorator ( CFrame  parent  )  [inline]

Constructor.

Parameters:
parent The parent JComponent to draw the mouse symbol to.

Definition at line 86 of file CPopupMenuDecorator.java.

References g_mesh_buttons, g_radio_buttons, m_about, m_add_mesh_points, m_add_polygon_points, m_delete_mesh, m_delete_polygon, m_edit_config, m_edit_mesh, m_edit_polygon, m_morph, m_off_mesh_points, m_off_polygon_points, m_sub_mesh_points, m_sub_polygon_points, mesh_menu, polygon_menu, and popup_menu.

                                             {
        this.parent = parent;
        /* Initialize the whole pop up menu. */
        popup_menu.add(m_morph);
        popup_menu.addSeparator();
        popup_menu.add(m_edit_mesh);
        popup_menu.add(m_edit_polygon);
        popup_menu.addSeparator();
        popup_menu.add(m_edit_config);
        popup_menu.add(this.mesh_menu);
        popup_menu.add(this.polygon_menu);
        popup_menu.addSeparator();
        popup_menu.add(m_about);
        mesh_menu.add(m_add_mesh_points);
        mesh_menu.add(m_sub_mesh_points);
        mesh_menu.add(m_off_mesh_points);
        mesh_menu.add(m_delete_mesh);
        polygon_menu.add(m_add_polygon_points);
        polygon_menu.add(m_sub_polygon_points);
        polygon_menu.add(m_off_polygon_points);
        polygon_menu.add(m_delete_polygon);
        g_radio_buttons.add(m_edit_mesh);
        g_radio_buttons.add(m_edit_polygon);
        g_mesh_buttons.add(m_add_mesh_points);
        g_mesh_buttons.add(m_sub_mesh_points);
        g_mesh_buttons.add(m_off_mesh_points);
        g_polygon_buttons.add(m_add_polygon_points);
        g_polygon_buttons.add(m_sub_polygon_points);
        g_polygon_buttons.add(m_off_polygon_points);
        /* Add the listeners. */
        m_morph.addActionListener(this);
        m_edit_mesh.addActionListener(this);
        m_edit_polygon.addActionListener(this);
        m_edit_config.addActionListener(this);
        m_add_mesh_points.addActionListener(this);
        m_sub_mesh_points.addActionListener(this);
        m_off_mesh_points.addActionListener(this);
        m_delete_mesh.addActionListener(this);
        m_add_polygon_points.addActionListener(this);
        m_sub_polygon_points.addActionListener(this);
        m_off_polygon_points.addActionListener(this);
        m_delete_polygon.addActionListener(this);
        m_about.addActionListener(this);
        parent.addMouseListener(this);
    }


Generated by  Doxygen 1.6.0   Back to index