Package java.awt.event

Examples of java.awt.event.MouseListener


                    changeListener.stateChanged (new ChangeEvent (evt));
                }
            }
        });
        // support for double click to finish dialog with selected class
        jMainClassList.addMouseListener (new MouseListener () {
            public void mouseClicked (MouseEvent e) {
                if (MouseUtils.isDoubleClick (e)) {
                    if (getSelectedMainClass () != null) {
                        if (changeListener != null) {
                            changeListener.stateChanged (new ChangeEvent (e));
View Full Code Here


        Label label = new Label(name);
        label.setAlignment(Label.CENTER);
        label.setName(name);
        label.setBackground(color);
        if (withListeners) {
            label.addMouseListener(new MouseListener() {
                public void mouseClicked(MouseEvent event) {
                    printEvent(event);
                }

                public void mousePressed(MouseEvent event) {
View Full Code Here

    tableModel.setColumnIdentifiers(new String[] { "Name", "Value" });
    tableModel.addTableModelListener(this);

    // add a mouse listener to the table model for delete and insert rows.
    MouseListener dataMouseListener = new MouseAdapter() {
     
      public void mouseClicked(MouseEvent e) {
        if (rightClick(e.getModifiers())) {
          dataModificationsPopup.show(e.getComponent(), e.getX(), e.getY());
        }
      }
    };

    setTableColumnWidths();

    tablePanel = new JPanel();
    tablePanel.setLayout(new BorderLayout());
    tablePanel.add(table.getTableHeader(), BorderLayout.NORTH);
    tablePanel.add(table, BorderLayout.CENTER);

    table.addMouseListener(dataMouseListener);

    mainPanel.add(tablePanel, BorderLayout.SOUTH);
    JSplitPane contentPanel = null;
    if (useConsole) {
      String welcomeMessage = getWelcomeMessage();

      bshConsole = new JConsole();
      Interpreter interpreter = new Interpreter(bshConsole);

      configureInterpreter(interpreter, cacheDelegate);

      interpreter.println(welcomeMessage);
       
      interpreter.setShowResults(!interpreter.getShowResults());// show() in beanShell
      System.setOut(bshConsole.getOut());
      System.setErr(bshConsole.getErr());
      Thread t = new Thread(interpreter);
      t.start();

      contentPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, mainPanel, bshConsole);
      getContentPane().add(contentPanel);
    } else {
      getContentPane().add(mainPanel);
    }

    jtree.addTreeSelectionListener(this);// REVISIT

    MouseListener ml = new MouseAdapter() {
     
      public void mouseClicked(final MouseEvent e) {
       
        if (log.isTraceEnabled()) {
          log.trace("clicked GUI");
View Full Code Here

                AnchorConstraint.ANCHOR_REL,
                AnchorConstraint.ANCHOR_REL,
                AnchorConstraint.ANCHOR_REL));
        processList.setModel(processListModel);
        processList.setPreferredSize(new java.awt.Dimension(106, 167));
        MouseListener mouseListener = new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent e) {
            if (e.getClickCount() >= 1) {
              int position = processList.getSelectedIndex();
              String process = (String) processListModel
View Full Code Here

    public ApplicationView(SingleFrameApplication app) {
        super(app);
        initComponents();

        MouseListener mouseListener = new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() >= 1)  {
                    int position = usersList.locationToIndex(e.getPoint());
                    String userName = (String)usersListModel.getElementAt(position);
View Full Code Here

    public ApplicationView(SingleFrameApplication app) {
        super(app);
        initComponents();

        MouseListener mouseListener = new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() >= 1)  {
                    int position = usersList.locationToIndex(e.getPoint());
                    String userName = (String)usersListModel.getElementAt(position);
View Full Code Here

    this.templateList = new JList(templateListModel);
    this.templateList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    this.templateList.setLayoutOrientation(JList.VERTICAL);
    this.templateList.setVisibleRowCount(-1);

    MouseListener mouseListener = new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent mouseEvent) {
        ClientView.this.templateList = (JList) mouseEvent.getSource();
        int index = ClientView.this.templateList.locationToIndex(mouseEvent.getPoint());
        if (index >= 0) {
View Full Code Here

    this.subscriptionList = new JList(this.subscriptionListModel);
    this.subscriptionList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    this.subscriptionList.setLayoutOrientation(JList.VERTICAL);
    this.subscriptionList.setVisibleRowCount(-1);

    MouseListener mouseListener = new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent mouseEvent) {
        ClientView.this.subscriptionList = (JList) mouseEvent.getSource();
        int index = ClientView.this.subscriptionList.locationToIndex(mouseEvent
            .getPoint());
View Full Code Here

    this.addItemListener(new ItemListener() {
      public void itemStateChanged(ItemEvent ie) {
        that.setIcon((ie.getStateChange() == ItemEvent.SELECTED) ? that.moCheckedCB : that.moUncheckedCB);
      }
    });
    this.addMouseListener(new MouseListener() {
      public void mouseEntered(MouseEvent me) {
        that.setIcon((that.isSelected()) ? that.moCheckedCB : that.moUncheckedCB);
      }

      public void mouseExited(MouseEvent me) {
View Full Code Here

    table.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
    table.getColumnModel().getColumn(0).setMinWidth(60);
    table.getColumnModel().getColumn(0).setMaxWidth(60);

    table.addMouseListener(new MouseListener() {

      public void mouseReleased(MouseEvent e)
      {
      }
View Full Code Here

TOP

Related Classes of java.awt.event.MouseListener

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.