Package java.awt.event

Examples of java.awt.event.ComponentAdapter


  /**
   * Sets up the listeners an event handling in general.
   */
  private void eventHandling() {
    this.addComponentListener(new ComponentAdapter() {

      @Override
      public void componentResized(final ComponentEvent e) {
        if (!t.isRunning()) {
          resetTextPos();
View Full Code Here


    header = new JLabel();
    header.addMouseListener(new HeaderMouseListener());
    pane.add(header);
    // Request group status the first time the component is shown (when the
    // user switches to the group tab)
    pane.addComponentListener(new ComponentAdapter() {
      @Override
      public void componentShown(ComponentEvent e) {
        if (!initialized) {
          String[] args = { "status" };
          SlashActionRepository.get("group").execute(args, "");
View Full Code Here

        scrollPane.getViewport().setBackground(CP_BACKGROUND_COLOR);
        scrollPane.getVerticalScrollBar().setUnitIncrement(50);
        scrollPane.getHorizontalScrollBar().setUnitIncrement(50);
        add(scrollPane, BorderLayout.CENTER);

        addComponentListener(new ComponentAdapter() {

            @Override
            public void componentResized(ComponentEvent e) {
                scrollPane.getVerticalScrollBar().setBlockIncrement((int) (scrollPane.getVerticalScrollBar().getModel().getExtent() * 0.95f));
                scrollPane.getHorizontalScrollBar().setBlockIncrement((int) (scrollPane.getHorizontalScrollBar().getModel().getExtent() * 0.95f));
 
View Full Code Here

                        m_splitPaneVert.setDividerLocation(Main.m_settings.getVertDividerLocation());
                    }
                });
            }
        });
        this.addComponentListener(new ComponentAdapter()
        {
            @Override
            public void componentResized(ComponentEvent e)
            {
                if (!m_bInFullScreenMode && getExtendedState() != Frame.MAXIMIZED_BOTH)
View Full Code Here

            final int defaultWidth, final int defaultHeight) {

        comp.setLocation(getPreference(propX, defaultY), getPreference(propY, defaultX));
        comp.setSize(getPreference(propWidth, defaultWidth), getPreference(propHeight, defaultHeight));

        comp.addComponentListener(new ComponentAdapter() {
            @Override
            public void componentMoved(ComponentEvent e) {
                setPreference(propX, e.getComponent().getX(), false);
                setPreference(propY, e.getComponent().getY(), true);
            }
View Full Code Here

        state=null;
      }
               
            createOffscreenImage(false);
            addMouseMotionListener(this);
            addComponentListener(new ComponentAdapter() {
                public void componentResized(ComponentEvent e) {
                    if(getWidth() <= 0 || getHeight() <= 0) return;
                    createOffscreenImage(false);
                }
            });
View Full Code Here

        this.rotateMode = rotateMode;

        // The AffineTransform in the Modes sometimes depends on the size
        // of the ModeOverlay:
        overlay.addComponentListener(
            new ComponentAdapter() {
                public void componentResized(ComponentEvent event) {
                    setTransform(xform);
                }
            }
        );
        // Modes also require notification about the location and size of
        // their underlay:
        underlay.addComponentListener(
            new ComponentAdapter() {
                public void componentResized(ComponentEvent event) {
                    Rectangle bounds = event.getComponent().getBounds();
                    setUnderlayBounds(bounds);
                }
                public void componentMoved(ComponentEvent event) {
View Full Code Here

    private ImageEditorEngine engine;

    PassThroughPreview(ImageEditorEngine engine) {
        this.engine = engine;
        addComponentListener(
            new ComponentAdapter() {
                public void componentResized(ComponentEvent event) {
                    if (isShowing()) {
                        PassThroughPreview.this.engine.update(null, false);
                    }
                }
View Full Code Here

    ZoneFinder(final ImageEditorEngine engine, boolean colorMode) {
        this.engine = engine;
        this.colorMode = colorMode;

        addComponentListener(
            new ComponentAdapter() {
                public void componentResized(ComponentEvent event) {
                    if (isShowing()) {
                        engine.update(null, false);
                    }
                }
View Full Code Here

        Dialog.getRootPane().setDefaultButton(Button);
        Dialog.pack();
        Dialog.setLocationRelativeTo(frame);

        Dialog.addComponentListener(
            new ComponentAdapter() {
                public void componentHidden(ComponentEvent e) {
                    Interrupted = true;
                }
            }
        );
View Full Code Here

TOP

Related Classes of java.awt.event.ComponentAdapter

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.