Package java.awt.event

Examples of java.awt.event.ComponentListener


      }
    });
    handleBackgroundPainterChanged(mProgramTable.getBackgroundPainter());

    getViewport().addChangeListener(this);
    addComponentListener(new ComponentListener() {

      public void componentHidden(ComponentEvent e) {
      }

      public void componentMoved(ComponentEvent e) {
View Full Code Here


    mDialog.getRootPane().getInputMap(JComponent.WHEN_FOCUSED).put(stroke,
        "SCROLL_DOWN");
    mDialog.getRootPane().getActionMap().put("SCROLL_DOWN", mDownAction);

    if (ProgramInfo.getInstance().getSettings().getShowFunctions()) {
      mDialog.addComponentListener(new ComponentListener() {
        public void componentResized(ComponentEvent e) {
          mActionsPane.getVerticalScrollBar().setBlockIncrement(
              mActionsPane.getVisibleRect().height);
        }
View Full Code Here

            toggleShowHide();
          }
        }
      });

      MainFrame.getInstance().addComponentListener(new ComponentListener() {

        public void componentResized(ComponentEvent e) {
          int state = MainFrame.getInstance().getExtendedState();

          if ((state & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH) {
View Full Code Here

        ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    if (comp instanceof TableTab) {
      pane.setVerticalScrollBar(((TableTab) comp).getVerticalScrollBar());
    }
    pane.addComponentListener(new ComponentListener() {
      public void componentResized(ComponentEvent event) {
        int width = pane.getViewport().getWidth();
        comp.setSize(new Dimension(width, comp.getHeight()));
      }
View Full Code Here

        }

        palette = (Container) event.getSource();
        int eventType = event.getID();
        for (Iterator it = localHackList.iterator(); it.hasNext();) {
            ComponentListener target = (ComponentListener) it.next();
            if (eventType == ComponentEvent.COMPONENT_HIDDEN) {
                target.componentHidden(event);
            } else if (eventType == ComponentEvent.COMPONENT_SHOWN) {
                target.componentShown(event);
            }
        }

        if (eventType == ComponentEvent.COMPONENT_HIDDEN) {
            palette = null;
View Full Code Here

        });
        // Add tabpan on the content pane
        getContentPane().add(getTabs(), BorderLayout.CENTER);
        // Add toolbar
        toolBar = new GPToolBar("GanttProject", options.getToolBarPosition(), getOptions());
        toolBar.addComponentListener(new ComponentListener() {

            public void componentResized(ComponentEvent arg0) {
                setHiddens();
                refresh();
            }
View Full Code Here

   */
  public ScrolledViewport(JComponent view) {
    this.view = view;
    originalBorder = view.getBorder();
    scrollPane = new JScrollPane(view);
    ComponentListener listener = new ScrollBarVisibilityChangeListener();
    scrollPane.getHorizontalScrollBar().addComponentListener(listener);
    scrollPane.getVerticalScrollBar().addComponentListener(listener);
  }
View Full Code Here

public class ExpandedImageBrowser extends AbstractImageBrowser {

    public ExpandedImageBrowser(ImageList list) {
        super(list);
        addComponentListener(
                new ComponentListener() {
                    public void componentResized(ComponentEvent e) {

                    }
                    public void componentMoved(ComponentEvent e) {
View Full Code Here

      internalFrame.setVisible(true);
      internalFrame.setContentPane(pnl);
      internalFrame.pack();

      pDesktop.add(internalFrame, null);
      internalFrame.addComponentListener(new ComponentListener() {
        @Override
        public void componentHidden(ComponentEvent arg0) {
          // empty
        }
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

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.