Example usage for java.awt.event ComponentEvent COMPONENT_MOVED

List of usage examples for java.awt.event ComponentEvent COMPONENT_MOVED

Introduction

In this page you can find the example usage for java.awt.event ComponentEvent COMPONENT_MOVED.

Prototype

int COMPONENT_MOVED

To view the source code for java.awt.event ComponentEvent COMPONENT_MOVED.

Click Source Link

Document

This event indicates that the component's position changed.

Usage

From source file:Main.java

@Override
public void componentShown(ComponentEvent evt) {
    System.out.println(evt.getID() == ComponentEvent.COMPONENT_FIRST);
    ComponentEvent event = new ComponentEvent((Component) evt.getSource(), ComponentEvent.COMPONENT_MOVED);

}

From source file:Main.java

@Override
public void componentMoved(ComponentEvent e) {
    System.out.println(e.getID() == ComponentEvent.COMPONENT_MOVED);
}

From source file:EventTestPane.java

/** Display Component events. */
public void processComponentEvent(ComponentEvent e) {
    switch (e.getID()) {
    case ComponentEvent.COMPONENT_MOVED:
        showLine("COMPONENT_MOVED");
        break;/*from   w w  w  . j a  va  2 s. c  o m*/
    case ComponentEvent.COMPONENT_RESIZED:
        showLine("COMPONENT_RESIZED");
        break;
    case ComponentEvent.COMPONENT_HIDDEN:
        showLine("COMPONENT_HIDDEN");
        break;
    case ComponentEvent.COMPONENT_SHOWN:
        showLine("COMPONENT_SHOWN");
        break;
    }
}

From source file:it.ventuland.ytd.ui.GUIClient.java

@Override
public void processComponentEvent(ComponentEvent e) {
    switch (e.getID()) {
    case ComponentEvent.COMPONENT_MOVED:
        break;/*from ww  w.j  a va2s  .  co  m*/
    case ComponentEvent.COMPONENT_RESIZED:
        middlepane.setDividerLocation(middlepane.getWidth() / 3);
        break;
    case ComponentEvent.COMPONENT_HIDDEN:
        break;
    case ComponentEvent.COMPONENT_SHOWN:
        break;
    }
}

From source file:zsk.JFCMainClient.java

public void processComponentEvent(ComponentEvent e) {
    switch (e.getID()) {
    case ComponentEvent.COMPONENT_MOVED:
        break;/*from   w ww  . j  a  v a 2 s .c  om*/
    case ComponentEvent.COMPONENT_RESIZED:
        JFCMainClient.frame.middlepane.setDividerLocation(JFCMainClient.frame.middlepane.getWidth() / 3);
        break;
    case ComponentEvent.COMPONENT_HIDDEN:
        break;
    case ComponentEvent.COMPONENT_SHOWN:
        break;
    }
}