本文整理汇总了Java中org.eclipse.swt.custom.CTabFolderEvent类的典型用法代码示例。如果您正苦于以下问题:Java CTabFolderEvent类的具体用法?Java CTabFolderEvent怎么用?Java CTabFolderEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CTabFolderEvent类属于org.eclipse.swt.custom包,在下文中一共展示了CTabFolderEvent类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: init
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
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();
}
开发者ID:theokyr,项目名称:TuxGuitar-1.3.1-fork,代码行数:23,代码来源:TGTabFolder.java
示例2: doConnectionResultConversion
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
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();
}
开发者ID:DaveVoorhis,项目名称:Rel,代码行数:17,代码来源:DbTab.java
示例3: ComponentTitledBorder
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
/**
* 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);
}
开发者ID:arx-deidentifier,项目名称:arx,代码行数:33,代码来源:ComponentTitledBorder.java
示例4: doConnectionResultSuccess
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
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);
}
开发者ID:DaveVoorhis,项目名称:Rel,代码行数:37,代码来源:DbTab.java
示例5: close
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
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 );
}
}
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:9,代码来源:TabSet.java
示例6: createTabFolder
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
/**
* @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);
}
开发者ID:dzh,项目名称:jframe,代码行数:36,代码来源:JframeApp.java
示例7: ComponentTitledFolder
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
/**
* 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;
}
});
}
开发者ID:arx-deidentifier,项目名称:arx,代码行数:41,代码来源:ComponentTitledFolder.java
示例8: createTabItem
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
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 + ' ');
}
开发者ID:TheWhiteShadow3,项目名称:cuina,代码行数:34,代码来源:Neu3_Backup_ScriptEditor.java
示例9: createTabItem
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
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 + ' ');
}
开发者ID:TheWhiteShadow3,项目名称:cuina,代码行数:37,代码来源:ScriptEditor.java
示例10: close
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
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 );
}
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:9,代码来源:TabSet.java
示例11: createScriptTab
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
private static void createScriptTab() {
tabContent = new CTabFolder(sashFormProgress, SWT.CLOSE | SWT.BORDER);
tabContent.setTabHeight(20);
tabContent.marginHeight = 5;
tabContent.marginWidth = 5;
tabContent.setMaximizeVisible(true);
tabContent.setMinimizeVisible(true);
tabContent.setSelectionBackground(new Color(display, new RGB(153, 186, 243)));
tabContent.setSimple(false);
tabContent.setUnselectedCloseVisible(true);
tabContent.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
if (event.detail == 0) {
System.out.println("%#@%[email protected]#%@#%[email protected]#%%@#");
}
}
});
tabContent.addCTabFolder2Listener(new CTabFolder2Adapter() {
public void close(CTabFolderEvent e) {
CTabItem closingItem = (CTabItem) e.item;
String tabName = closingItem.getText();
//System.out.println("Close "+tabName+" "+closingItem.getData(tabName));
if (!tabName.contains("*")) {
System.out.println("tabName:" + closingItem.getData(tabName));
htTab.remove(closingItem.getData(tabName));
htCaseViewer.remove(closingItem.getData(tabName));
htCaseList.remove(closingItem.getData(tabName));
} else {
int choice = showNotification("是否保存?", SWT.ICON_QUESTION | SWT.YES | SWT.NO
| SWT.CANCEL);
if (choice == SWT.YES) {
saveScript();
htTab.remove(closingItem.getData(tabName.substring(1, tabName.length())));
} else if (choice == SWT.NO)
htTab.remove(closingItem.getData(tabName.substring(1, tabName.length())));
else if (choice == SWT.CANCEL)
e.doit = false;
}
}
});
}
开发者ID:hoozheng,项目名称:AndroidRobot,代码行数:45,代码来源:AndroidRobot.java
示例12: maximize
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
public void maximize(CTabFolderEvent event) {
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:4,代码来源:TabSet.java
示例13: minimize
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
public void minimize(CTabFolderEvent event) {
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:4,代码来源:TabSet.java
示例14: showList
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
public void showList(CTabFolderEvent event) {
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:4,代码来源:TabSet.java
示例15: restore
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
public void restore(CTabFolderEvent event) {
}
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:4,代码来源:TabSet.java
示例16: maximize
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
public void maximize( CTabFolderEvent event ) {
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:4,代码来源:TabSet.java
示例17: minimize
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
public void minimize( CTabFolderEvent event ) {
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:4,代码来源:TabSet.java
示例18: showList
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
public void showList( CTabFolderEvent event ) {
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:4,代码来源:TabSet.java
示例19: restore
import org.eclipse.swt.custom.CTabFolderEvent; //导入依赖的package包/类
public void restore( CTabFolderEvent event ) {
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:4,代码来源:TabSet.java
注:本文中的org.eclipse.swt.custom.CTabFolderEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论