Package org.eclipse.swt.custom

Examples of org.eclipse.swt.custom.CTabFolder2Adapter


    });
    butRemoveInclude.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false));
    butRemoveInclude.setText("Remove");


    tabFolder.addCTabFolder2Listener(new CTabFolder2Adapter() {
      public void close(final CTabFolderEvent e) {

        if (e.item.equals(parameterTabItem) ||
            e.item.equals(environmentTabItem) ||
            e.item.equals(includesTabItem)) {
View Full Code Here


    });

   
   
    // on tab close
    folder.addCTabFolder2Listener(new CTabFolder2Adapter() {
      public void close(CTabFolderEvent event) {

        //IEditor editor = getCurrentEditor();
        IEditor editor = (IEditor)((CTabItem)(event.item)).getControl();
        if (editor.hasChanges()) {
View Full Code Here

    });
    butRemoveInclude.setLayoutData(new GridData(GridData.FILL, GridData.BEGINNING, false, false));
    butRemoveInclude.setText("Remove");


    tabFolder.addCTabFolder2Listener(new CTabFolder2Adapter() {
      public void close(final CTabFolderEvent e) {

        if (e.item.equals(parameterTabItem) ||
            e.item.equals(environmentTabItem) ||
            e.item.equals(includesTabItem)) {
View Full Code Here

    props.setLook(wScriptsFolder);
    styleTabFolder(wScriptsFolder);

    // confirms closing script tabs, and will never close the last one
    wScriptsFolder.addCTabFolder2Listener(new CTabFolder2Adapter() {
      public void close(CTabFolderEvent event) {
        CTabItem cItem = (CTabItem) event.item;
        event.doit = false;
        if (cItem != null && wScriptsFolder.getItemCount() > 1) {
          MessageBox messageBox = new MessageBox(shell, SWT.ICON_QUESTION | SWT.NO | SWT.YES);
View Full Code Here

    props.setLook(wLeftFolder);

    //styleTabFolder(wLeftFolder);

    // implement minimize logic
    wLeftFolder.addCTabFolder2Listener(new CTabFolder2Adapter() {

      @Override
      public void minimize(CTabFolderEvent e) {
        itemSettings.setEnabled(true);
        wTop.SASH_WIDTH = 0;
View Full Code Here

    text.setText("Text for item "+i+"\n\none, two, three\n\nabcdefghijklmnop");
    item.setControl(text);
  }
  folder.setMinimizeVisible(true);
  folder.setMaximizeVisible(true);
  folder.addCTabFolder2Listener(new CTabFolder2Adapter() {
    @Override
    public void minimize(CTabFolderEvent event) {
      folder.setMinimized(true);
      folder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
      shell.layout(true);
View Full Code Here

    tabFolder.setSimple(false);
    tabFolder.setUnselectedImageVisible(false);
    tabFolder.setUnselectedCloseVisible(true);
    tabFolder.setMinimizeVisible(true);
    tabFolder.setMaximizeVisible(true);
    tabFolder.addCTabFolder2Listener(new CTabFolder2Adapter() {
      public void close(CTabFolderEvent ev) {
        ev.doit = false;
        ((CTabItem) ev.item).notifyListeners(SWT.CLOSE, new Event());
      }
    });
View Full Code Here

        private CTabItem item;
        public BrowserProgressListener( final IProgressMonitor monitor, final CTabItem item,
                CTabFolder tabFolder ) {
            this.monitor = monitor;
            this.item = item;
            tabFolder.addCTabFolder2Listener(new CTabFolder2Adapter(){
                @Override
                public void close( CTabFolderEvent event ) {
                    if( event.item == item ){
                        monitor.done();
                    }
View Full Code Here

    tabPane.setBorderVisible(true);
    tabPane.setLayoutData(new GridData(GridData.FILL_BOTH));
    tabPane.setSimple(false);
   
    // Close Tab Listener
    tabPane.addCTabFolder2Listener(new CTabFolder2Adapter() {
      public void close(CTabFolderEvent event) {
        if (openedInstances.containsValue(event.item)) {
          for(String s : openedInstances.keySet()) {
            if(openedInstances.get(s).equals(event.item)) {
              openedInstances.remove(s);
View Full Code Here

  /**
   * Hooks the custom listener specified by eventName.
   */
  void hookCustomListener(final String eventName) {
    if (eventName == "CTabFolderEvent")
      tabFolder1.addCTabFolder2Listener(new CTabFolder2Adapter() {
        public void close(CTabFolderEvent event) {
          log(eventName, event);
        }
      });
  }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.custom.CTabFolder2Adapter

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.