Package java.awt.event

Examples of java.awt.event.ComponentListener


    public DeviceView(Context context) {
        super(context);
        setLayout(null);
        update();

        addComponentListener(new ComponentListener() {

            public void componentHidden(ComponentEvent e) {
                update();
            }
View Full Code Here


    /**
     * Adds a listener for debugging size at Component events.
     */
    public static void addComponentSizeDebugListeners(final Component comp) {
        comp.addComponentListener(
            new ComponentListener() {
                private void log(ComponentEvent event) {
                    System.err.println("Size: "+comp.getWidth()+" x "+comp.getHeight()+" after "+event);
                }
                public void componentHidden(ComponentEvent event) {
                    log(event);
View Full Code Here

    SWT.error (SWT.ERROR_NOT_IMPLEMENTED, e);
  }
  if (handle == 0) SWT.error (SWT.ERROR_INVALID_ARGUMENT, null, " [peer not created]");

  final Shell shell = Shell.gtk_new (display, handle);
  final ComponentListener listener = new ComponentAdapter () {
    public void componentResized (ComponentEvent e) {
      display.syncExec (new Runnable () {
        public void run () {
          if (shell.isDisposed()) return;
          Dimension dim = parent.getSize ();
View Full Code Here

        dialog.setLocation(appWindow.getLocation().x + (appWindow.getSize().width / 2 - wSize.width / 2),
                appWindow.getLocation().y + (appWindow.getSize().height / 2 - wSize.height / 2));

        // set the component listener
        final PosDialog  thisPosDialog = this;
        dialog.addComponentListener(new ComponentListener() {

            public void componentResized(ComponentEvent event) {
                this.reset();
            }
View Full Code Here

                    ChangeListener ck[] = kk.keyboardButton.getChangeListeners();
                    for (ChangeListener k : ck)
                        kk.keyboardButton.removeChangeListener(k);

                    ComponentListener clk[] = kk.keyboardButton.getComponentListeners();
                    for (ComponentListener k : clk)
                        kk.keyboardButton.removeComponentListener(k);

                    kk.keyboardButton = null;
                }
View Full Code Here

            });
        } catch (Exception ex) {
            ex.printStackTrace();
        }
       
        this.addComponentListener(new ComponentListener(){
            public void componentResized(ComponentEvent e) {
                appletResized(e);
            }
            public void componentMoved(ComponentEvent e){}
            public void componentShown(ComponentEvent e){}
View Full Code Here

  public JSuggestField(Window owner) {
    super();
    data = new Vector<String>();
    suggestions = new Vector<String>();
    listeners = new LinkedList<ActionListener>();
    owner.addComponentListener(new ComponentListener() {
      @Override
      public void componentShown(ComponentEvent e) {
        relocate();
      }
View Full Code Here

      pack();
      setSize(settings.windowWidth, settings.windowHeight);
      //        setResizable(false);
      setVisible(true);

      addComponentListener(new ComponentListener() {
        public void componentResized(ComponentEvent e) {
          int width = getWidth();
          int height = getHeight();
          if (width < MIN_WIDTH || height < MIN_HEIGHT) {
            width = (width < MIN_WIDTH) ? MIN_WIDTH : width;
View Full Code Here

    /**
     * Die Startmethode des (urspr�nglichen) Applets.
     */
    private void start() {

        this.addComponentListener(new ComponentListener() {
            @Override
            public void componentHidden(final ComponentEvent e) {

            }

View Full Code Here

     *            Ob die initialisierung eingeschr�nkt erfolgen soll, in diesem
     *            Fall werden nur die Listener initialisiert, die keine
     *            Ver�nderung an Graphen vornehmen.
     */
    private void start(final boolean eingesch) {
        this.addComponentListener(new ComponentListener() {
            @Override
            public void componentHidden(final ComponentEvent e) {

            }

View Full Code Here

TOP

Related Classes of java.awt.event.ComponentListener

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.