Java 类org.eclipse.swt.custom.CTabFolderEvent 实例源码

项目:TuxGuitar-1.3.1-fork    文件:TGTabFolder.java   
public void init(Composite parent) {
    this.tabFolder = new CTabFolder(parent, SWT.TOP);
    this.tabFolder.setTabHeight(TAB_HEIGHT);
    this.tabFolder.setLayout(new FillLayout());
    this.tabFolder.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
            TGTabFolder.this.onTabItemSelected();
        }
    });

    this.tabFolder.addCTabFolder2Listener(new CTabFolder2Adapter() {
        public void close(CTabFolderEvent event) {
            TGDocument document = (TGDocument) event.item.getData();
            if( document != null ) {
                closeDocument(document);
                event.doit = false;
            }
        }
    });

    this.updateDocument();
}
项目:Rel    文件:DbTab.java   
private void doConnectionResultConversion(String message, String dbURL) {
    setImage(IconLoader.loadIcon("DatabaseIcon"));

    setStatus("Requires conversion to the current database format.");

    showConversion(message, dbURL.substring("db:".length()));

    DBrowser.getTabFolder().addCTabFolder2Listener(new CTabFolder2Adapter() {
        public void close(CTabFolderEvent event) {
            if (event.item == DbTab.this)
                DbTab.this.close();
        }
    });

    DBrowser.createNewTabIfNeeded();
}
项目:arx    文件:ComponentTitledBorder.java   
/**
 * Creates a new instance.
 *
 * @param parent
 * @param controller
 * @param title
 * @param id
 */
public ComponentTitledBorder(Composite parent, Controller controller, String title, String id){

    folder = new CTabFolder(parent, SWT.TOP | SWT.BORDER | SWT.FLAT);
    folder.setUnselectedCloseVisible(false);
    folder.setSimple(false);

    // Create help button
    if (controller != null) SWTUtil.createHelpButton(controller, folder, id);

    // Prevent closing
    folder.addCTabFolder2Listener(new CTabFolder2Adapter() {
        @Override
        public void close(final CTabFolderEvent event) {
            event.doit = false;
        }
    });

    // Create general tab
    tab = new CTabItem(folder, SWT.NULL);
    tab.setText(title);
    tab.setShowClose(false);

    folder.setSelection(tab);
}
项目:Rel    文件:DbTab.java   
private void doConnectionResultSuccess(DbConnection client, String dbURL, boolean permanent) {
    setImage(IconLoader.loadIcon("DatabaseIcon"));

    setStatus("Ok");
    toolBarMode.setEnabled(true);

    refresh();

    if (tltmModeRel.getSelection())
        showRel();
    else if (tltmModeRev.getSelection())
        showRev();
    else if (tltmModeCmd.getSelection())
        showCmd();
    else {
        // default mode
        if (Preferences.getPreferenceBoolean(PreferencePageGeneral.DEFAULT_CMD_MODE)) {
            tltmModeCmd.setSelection(true);
            showCmd();
        } else {
            tltmModeRel.setSelection(true);
            showRel();
        }
    }

    DBrowser.getTabFolder().addCTabFolder2Listener(new CTabFolder2Adapter() {
        public void close(CTabFolderEvent event) {
            if (event.item == DbTab.this)
                DbTab.this.close();
        }
    });

    DBrowser.createNewTabIfNeeded();

    DBrowser.updateRecentlyUsedDatabaseList(dbURL);
}
项目:geokettle-2.0    文件:TabSet.java   
public void close(CTabFolderEvent event) {
    for( int i=0; i<tabList.size(); i++ ) {
        TabItem item = tabList.get(i);
        if( event.item.equals( item.getSwtTabItem() ) ) {
            event.doit = notifyCloseListeners( item );
        }
    }
}
项目:jframe    文件:JframeApp.java   
/**
 * @param content
 */
private void createTabFolder(Composite content) {
    CTabFolder folder = new CTabFolder(content, SWT.BORDER | SWT.BOTTOM);
    // folder.setSimple(false);
    // folder.setUnselectedImageVisible(false);
    // folder.setUnselectedCloseVisible(false);
    // folder.setMinimizeVisible(true);
    // folder.setMaximizeVisible(true);
    // configuration
    CTabItem startTab = new CTabItem(folder, SWT.NONE);
    startTab.setText("TAB1");
    Composite config = createMonitorConfig(folder);
    startTab.setControl(config);

    // monitor info
    CTabItem item = new CTabItem(folder, SWT.NONE);
    item.setText("TAB2");
    Text text = new Text(folder, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
    text.setEditable(false);
    showRecvMsg(text);
    item.setControl(text);

    folder.addCTabFolder2Listener(new CTabFolder2Adapter() {
        @Override
        public void close(CTabFolderEvent event) {
            // if (event.item.equals(specialItem)) {
            // event.doit = false;
            // }
        }
    });
    folder.setSelection(item);

}
项目:read-open-source-code    文件:TabSet.java   
public void close(CTabFolderEvent event) {
    for( int i=0; i<tabList.size(); i++ ) {
        TabItem item = tabList.get(i);
        if( event.item.equals( item.getSwtTabItem() ) ) {
            event.doit = notifyCloseListeners( item );
        }
    }
}
项目:kettle-4.4.0-stable    文件:TabSet.java   
public void close(CTabFolderEvent event) {
    for( int i=0; i<tabList.size(); i++ ) {
        TabItem item = tabList.get(i);
        if( event.item.equals( item.getSwtTabItem() ) ) {
            event.doit = notifyCloseListeners( item );
        }
    }
}
项目:kettle-trunk    文件:TabSet.java   
public void close(CTabFolderEvent event) {
    for( int i=0; i<tabList.size(); i++ ) {
        TabItem item = tabList.get(i);
        if( event.item.equals( item.getSwtTabItem() ) ) {
            event.doit = notifyCloseListeners( item );
        }
    }
}
项目:arx    文件:ComponentTitledFolder.java   
/**
 * Creates a new instance.
 *
 * @param parent
 * @param controller
 * @param bar
 * @param id
 * @param bottom
 * @param hasHidingMenu
 */
public ComponentTitledFolder(Composite parent, 
                             Controller controller, 
                             ComponentTitledFolderButtonBar bar, 
                             String id, 
                             Map<Composite, String> helpids,
                             boolean bottom,
                             boolean hasHidingMenu){

    int flags = SWT.BORDER | SWT.FLAT;
    if (bottom) flags |= SWT.BOTTOM;
    else flags |= SWT.TOP;

    this.hasHidingMenu = hasHidingMenu;

    this.folder = new CTabFolder(parent, flags);
    this.folder.setUnselectedCloseVisible(false);
    this.folder.setSimple(false);

    // Create help button
    if (bar == null) SWTUtil.createHelpButton(controller, folder, id, helpids);
    else createBar(controller, folder, bar);

    // Prevent closing
    this.folder.addCTabFolder2Listener(new CTabFolder2Adapter() {
        @Override
        public void close(final CTabFolderEvent event) {
            event.doit = false;
        }
    });
}
项目:cuina    文件:Neu3_Backup_ScriptEditor.java   
private void createTabItem()
{
    tabItem = new CTabItem(tabFolder, commandPage.important ? SWT.NONE : SWT.CLOSE);
    Color bgc = tabFolder.getDisplay().getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT);
    tabFolder.setBackground(bgc);
    if (commandPage.important)
    {
        tabItem.setImage(Scripts.getImage(Scripts.IMG_PAGE_REQUIRED));
        if (pageFont == null)
        {
            FontData[] data = tabItem.getFont().getFontData();
            data[0].setStyle(SWT.BOLD);
            pageFont = new Font(tabFolder.getDisplay(), data[0]);
        }
        tabItem.setFont(pageFont);
    }
    else
    {
        tabItem.setImage(Scripts.getImage(Scripts.IMG_PAGE_OPTIONAL));
        tabFolder.addCTabFolder2Listener(new CTabFolder2Adapter()
        {
            @Override
            public void close(CTabFolderEvent event)
            {
                if (commandPage.lines.size() > 1)
                {
                    event.doit = (showCloseMessage() == SWT.YES);
                }
            }
        });
    }
    tabItem.setText(commandPage.name + ' ');
}
项目:cuina    文件:ScriptEditor.java   
private void createTabItem()
        {
            tabItem = new CTabItem(tabFolder, commandPage.important ? SWT.NONE : SWT.CLOSE);
            Color bgc = tabFolder.getDisplay().getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT);
            tabFolder.setBackground(bgc);
            if (commandPage.important)
            {
                tabItem.setImage(Scripts.getImage(Scripts.IMG_PAGE_REQUIRED));
                if (pageFont == null)
                {
                    FontData[] data = tabItem.getFont().getFontData();
                    data[0].setStyle(SWT.BOLD);
                    pageFont = new Font(tabFolder.getDisplay(), data[0]);
                }
                tabItem.setFont(pageFont);
            }
            else
            {
                tabItem.setImage(Scripts.getImage(Scripts.IMG_PAGE_OPTIONAL));
                tabFolder.addCTabFolder2Listener(new CTabFolder2Adapter()
                {
                    @Override
                    public void close(CTabFolderEvent event)
                    {
                        if (event.data != null) return;
                        event.doit = deletePage();
                        event.data = new Boolean(event.doit);
//                      if (commandPage.lines.size() > 1)
//                      {
//                          event.doit = (showCloseMessage() == SWT.YES);
//                      }
                    }
                });
            }
            tabItem.setText(commandPage.name + ' ');
        }
项目:pentaho-kettle    文件:TabSet.java   
public void close( CTabFolderEvent event ) {
  for ( int i = 0; i < tabList.size(); i++ ) {
    TabItem item = tabList.get( i );
    if ( event.item.equals( item.getSwtTabItem() ) ) {
      event.doit = notifyCloseListeners( item );
    }
  }
}
项目:geokettle-2.0    文件:TabSet.java   
public void maximize(CTabFolderEvent event) {

}
项目:geokettle-2.0    文件:TabSet.java   
public void minimize(CTabFolderEvent event) {

}
项目:geokettle-2.0    文件:TabSet.java   
public void showList(CTabFolderEvent event) {

}
项目:geokettle-2.0    文件:TabSet.java   
public void restore(CTabFolderEvent event) {

}
项目:read-open-source-code    文件:TabSet.java   
public void maximize(CTabFolderEvent event) {

}
项目:read-open-source-code    文件:TabSet.java   
public void minimize(CTabFolderEvent event) {

}
项目:read-open-source-code    文件:TabSet.java   
public void showList(CTabFolderEvent event) {

}
项目:read-open-source-code    文件:TabSet.java   
public void restore(CTabFolderEvent event) {

}
项目:kettle-4.4.0-stable    文件:TabSet.java   
public void maximize(CTabFolderEvent event) {

}
项目:kettle-4.4.0-stable    文件:TabSet.java   
public void minimize(CTabFolderEvent event) {

}
项目:kettle-4.4.0-stable    文件:TabSet.java   
public void showList(CTabFolderEvent event) {

}
项目:kettle-4.4.0-stable    文件:TabSet.java   
public void restore(CTabFolderEvent event) {

}
项目:kettle-trunk    文件:TabSet.java   
public void maximize(CTabFolderEvent event) {

}
项目:kettle-trunk    文件:TabSet.java   
public void minimize(CTabFolderEvent event) {

}
项目:kettle-trunk    文件:TabSet.java   
public void showList(CTabFolderEvent event) {

}
项目:kettle-trunk    文件:TabSet.java   
public void restore(CTabFolderEvent event) {

}
项目:pentaho-kettle    文件:TabSet.java   
public void maximize( CTabFolderEvent event ) {

  }
项目:pentaho-kettle    文件:TabSet.java   
public void minimize( CTabFolderEvent event ) {

  }
项目:pentaho-kettle    文件:TabSet.java   
public void showList( CTabFolderEvent event ) {

  }
项目:pentaho-kettle    文件:TabSet.java   
public void restore( CTabFolderEvent event ) {

  }