Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.ControlAdapter


    cmp.setLayout(layout);

    scrollComposite.setContent(cmp);
    scrollComposite.setExpandVertical(true);
    scrollComposite.setExpandHorizontal(true);
    scrollComposite.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        Rectangle r = scrollComposite.getClientArea();
        scrollComposite.setMinSize(cmp
            .computeSize(r.width, SWT.DEFAULT));
      }
View Full Code Here


        tableLayout.addColumnData(new ColumnWeightData(1, 18, true));
        tableLayout.addColumnData(new ColumnWeightData(1, 18, false));
        tableLayout.addColumnData(new ColumnWeightData(0, 18, false));
        tableLayout.addColumnData(new ColumnWeightData(0, 18, false));

        ControlListener columnResizeListener = new ControlAdapter() {
            // Javadoc inherited
            public void controlResized(ControlEvent event) {
                tableLayout.layout(table, true);
            }
        };
View Full Code Here

//        timer.start();
//      }
//    });
//

    parent.getShell().addControlListener(new ControlAdapter() {
      public void controlMoved(ControlEvent e)
      {
        if (!posPanel.isDisposed()) {
          posPanel.layout();
        } else {
View Full Code Here

        for (int i = 0; i < columnLabels.length; i++) {
            TreeColumn column = new TreeColumn(tree, 0, i);
            column.setText(columnLabels[i]);
        }

        tree.addControlListener(new ControlAdapter() {
            @Override
            public void controlResized(ControlEvent e) {
                Rectangle area = tree.getClientArea();
                TreeColumn[] columns = tree.getColumns();
                if (area.width > 0) {
View Full Code Here

    _titleViewer.setInput(getViewSite())
   
    fillData();
    _parent.pack()
   
    playlistTable.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        int width = playlistTable.getClientArea().width - playlistTable.getVerticalBar().getSize().x;       
        playlistColumnName.setWidth((int) (width * 0.6));
        playlistColumnCount.setWidth((int) (width * 0.2))
        playlistColumnPercent.setWidth((int) (width * 0.2));       
      }
    });
   
    genreTable.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        int width = genreTable.getClientArea().width - genreTable.getVerticalBar().getSize().x;       
        genreColumnName.setWidth((int) (width * 0.6));
        genreColumnCount.setWidth((int) (width * 0.2))
        genreColumnPercent.setWidth((int) (width * 0.2));       
      }
    });
   
    artistTable.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        int width = artistTable.getClientArea().width - artistTable.getVerticalBar().getSize().x;       
        artistColumnName.setWidth((int) (width * 0.6));
        artistColumnCount.setWidth((int) (width * 0.2))
        artistColumnPercent.setWidth((int) (width * 0.2));       
      }
    });
   
    albumTable.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        int width = albumTable.getClientArea().width - albumTable.getVerticalBar().getSize().x;       
        albumColumnName.setWidth((int) (width * 0.5));
        albumColumnAdditional.setWidth((int) (width * 0.2));
        albumColumnCount.setWidth((int) (width * 0.15))
        albumColumnPercent.setWidth((int) (width * 0.15));       
      }
    });
   
    titleTable.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        int width = titleTable.getClientArea().width - titleTable.getVerticalBar().getSize().x;       
        titleColumnName.setWidth((int) (width * 0.5));
        titleColumnAdditional.setWidth((int) (width * 0.2));
        titleColumnCount.setWidth((int) (width * 0.15))
View Full Code Here

    ((GridLayout) rightPanel.getLayout()).marginWidth = 5;
    sashForm.setWeights(new int[] { w1, w2 });
    leftPanelPercent = (float) w1 / (float) (w1 + w2);
    rightPanelPercent = (float) w2 / (float) (w1 + w2);

    rightPanel.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        setSashFormWidths();
      }
    });
View Full Code Here

                            hexScrollBar.setIncrement(sb.getIncrement());
                        }
                    }
                }
            };
            localComposite.addControlListener(new ControlAdapter()
            {
                public void controlResized(ControlEvent e)
                {
                    //if the control is resized, set different parameters to make a single line displays the same contents.
                    if (((GridLayout) localComposite.getLayout()).makeColumnsEqualWidth)
View Full Code Here

    // Ensures that this editor will only display the page's tab
    // area if there are more than one page
    //
    getContainer().addControlListener
      (new ControlAdapter() {
        boolean guard = false;
        @Override
        public void controlResized(ControlEvent event) {
          if (!guard) {
            guard = true;
View Full Code Here

    final ScrolledComposite scrolledComposite = new ScrolledComposite(this,
        SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    scrolledComposite.setExpandHorizontal(true);
    scrolledComposite.setExpandVertical(true);

    scrolledComposite.addControlListener(new ControlAdapter() {
      @Override
      public void controlResized(ControlEvent e) {
        Rectangle r = scrolledComposite.getClientArea();
        scrolledComposite.setMinSize(CharacterProfessionsView.this
            .computeSize(r.width, SWT.DEFAULT));
View Full Code Here

    ((GridLayout) rightPanel.getLayout()).marginWidth = 5;
    sashForm.setWeights(new int[] { w1, w2 });
    leftPanelPercent = (float) w1 / (float) (w1 + w2);
    rightPanelPercent = (float) w2 / (float) (w1 + w2);

    rightPanel.addControlListener(new ControlAdapter() {
      public void controlResized(ControlEvent e) {
        setSashFormWidths();
      }
    });
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.ControlAdapter

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.