当前位置: 首页>>代码示例>>Java>>正文


Java SWT.FLAT属性代码示例

本文整理汇总了Java中org.eclipse.swt.SWT.FLAT属性的典型用法代码示例。如果您正苦于以下问题:Java SWT.FLAT属性的具体用法?Java SWT.FLAT怎么用?Java SWT.FLAT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.eclipse.swt.SWT的用法示例。


在下文中一共展示了SWT.FLAT属性的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createViewerToolTipContentArea

@Override
protected Composite createViewerToolTipContentArea(Event event, ViewerCell cell, Composite parent) {
    final Composite composite = new Composite(parent, SWT.NONE);
    composite.setLayout(new GridLayout(2, false));
    composite.setBackground(rowColorBack);
    Plugin plugin = (Plugin) cell.getElement();

    Hyperlink button = new Hyperlink(composite, SWT.FLAT);
    button.setText("\uf05A");
    button.setFont(fontAwesome);
    button.setBackground(composite.getBackground());
    button.setForeground(rowColorTitle);
    button.setUnderlined(false);
    button.addListener (SWT.MouseDown, e -> Program.launch(GLUON_PLUGIN_URL + plugin.getUrl()));
    button.setToolTipText("Click to access the service's JavaDoc");

    Label text = new Label(composite, SWT.LEFT);
    final String description = plugin.getDescription();
    text.setText(description.contains(".") ? description.substring(0, description.indexOf(".")) : description);
    text.setBackground(composite.getBackground());
    text.setForeground(rowColorTitle);
    composite.pack();
    return composite;
}
 
开发者ID:gluonhq,项目名称:ide-plugins,代码行数:24,代码来源:PluginsSWT.java

示例2: createToolBar

public void createToolBar() {
	bar = new CoolBar(shell, SWT.FLAT | SWT.TOP);
	// bars
	bar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));

	createFileSection();
	createEditBar();
	createFontSection();
	createSettingsBar();

	bar.pack();
	bar.addListener(SWT.Resize, new Listener() {

		@Override
		public void handleEvent(Event arg0) {
			pmTrans.adjustLayout();
		}
	});
}
 
开发者ID:juanerasmoe,项目名称:pmTrans,代码行数:19,代码来源:BarManager.java

示例3: TrendControlImage

public TrendControlImage ( final Composite parent, final int style, final String connectionId, final String itemId, final String queryString )
{
    super ( parent, style );

    this.connectionId = connectionId;
    this.itemId = itemId;
    this.queryString = queryString;

    setLayout ( new FillLayout () );

    final Button button = new Button ( parent, SWT.PUSH | SWT.FLAT );
    button.setImage ( org.eclipse.scada.vi.details.swt.Activator.getDefault ().getImageRegistry ().get ( org.eclipse.scada.vi.details.swt.Activator.IMG_TREND ) );
    button.addSelectionListener ( new SelectionAdapter () {
        @Override
        public void widgetSelected ( final SelectionEvent e )
        {
            startHdView ();
        }
    } );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:20,代码来源:TrendControlImage.java

示例4: createContents

@Override
protected Control createContents(Composite parent) {
  Composite c = new Composite(parent, SWT.BORDER);

  GridLayout gridLayout = new GridLayout(1, false);
  gridLayout.marginWidth = 0;
  gridLayout.marginHeight = 0;
  gridLayout.horizontalSpacing = 0;
  gridLayout.verticalSpacing = 0;
  c.setLayout(gridLayout);

  GridData gd = new GridData(GridData.FILL_HORIZONTAL);
  c.setLayoutData(gd);

  ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
  toolBarManager.add(new OpenFilesAction(this));
  toolBarManager.add(new ScreenshotAction(this, false));
  toolBarManager.add(new ScreenshotAction(this, true));
  toolBarManager.add(new SaveScreenShotAction(this));
  ToolBar tb = toolBarManager.createControl(c);
  tb.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

  mUiAutomatorView = new UiAutomatorView(c, SWT.BORDER);
  mUiAutomatorView.setLayoutData(new GridData(GridData.FILL_BOTH));

  return parent;
}
 
开发者ID:DroidTesting,项目名称:android-uiautomatorviewer,代码行数:27,代码来源:UiAutomatorViewer.java

示例5: fillCoolBar

@Override
protected void fillCoolBar ( final ICoolBarManager coolBar )
{
    final IToolBarManager toolbar = new ToolBarManager ( SWT.FLAT | SWT.RIGHT );
    coolBar.add ( new ToolBarContributionItem ( toolbar, "main" ) );
    toolbar.add ( getAction ( ActionFactory.NEW_WIZARD_DROP_DOWN.getId () ) );
    coolBar.add ( new GroupMarker ( IWorkbenchActionConstants.MB_ADDITIONS ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:8,代码来源:ApplicationActionBarAdvisor.java

示例6: EclipseTabProvider

public EclipseTabProvider ( final Composite parent )
{
    this.folder = new CTabFolder ( parent, SWT.TOP | SWT.FLAT | SWT.BORDER );
    this.folder.setTabHeight ( 24 );
    this.folder.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );

    this.mgr = new MenuManager ();
    final Menu menu = this.mgr.createContextMenu ( this.folder );
    this.folder.setMenu ( menu );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:10,代码来源:EclipseTabProvider.java

示例7: createToolBar

/**
 * Creates the toolbar.
 */
private void createToolBar(Composite composite, Object layoutData) {
	toolBar = new ToolBar(composite, SWT.FLAT);
	toolBar.addListener(SWT.KeyUp, createToolbarCommandHandler());
	if (layoutData != null) toolBar.setLayoutData(layoutData);
	
	if (nativeFilter != null) {
		nativeFilterAdapter = (FilterAdapter) nativeFilterAdapterMap.get(nativeFilter.getClass());
		if (nativeFilterAdapter != null) {
			nativeToolItem = nativeFilterAdapter.create(toolBar);
			nativeToolItem.setSelection(true);
		} 
	}
	hexDumpToolItem = createHexDumpToolItem();
	if (nativeFilterAdapter == null) {
		// Default button changes for these instances.
		hexDumpToolItem.setSelection(true);
		// Prevent NullPointerExceptions if the nativeFilterAdapter does not apply.
		nativeFilterAdapter = hexFilterAdapter;
	}
	rawDumpToolItem = createRawDumpToolItem();
	new ToolItem(toolBar, SWT.SEPARATOR);
	copyToolItem = createCopyToolItem();
	new ToolItem(toolBar, SWT.SEPARATOR);
	createPrintToolItem();
	toolBar.pack();
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:29,代码来源:FileViewerWindow.java

示例8: createDialogArea

/**
 * Create contents of the dialog.
 * @param parent
 */

@Override
protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(1, false));
	
	Shell shell=container.getShell();
	shell.setText("View Transform");
	shell.setImage(ImagePathConstant.APP_ICON.getImageFromRegistry());
	
	CoolBar coolBar = new CoolBar(container, SWT.FLAT);
	coolBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	 CoolItem buttonItem = new CoolItem(coolBar, SWT.NONE | SWT.DROP_DOWN);
	  Composite buttonComposite = new Composite(coolBar, SWT.NONE);
	  buttonComposite.setLayout(new GridLayout(3, false));
	 
	  	createWrapButton(buttonComposite);

	    createCopyButton(buttonComposite);
	    
	    buttonComposite.pack();

	    Point size = buttonComposite.getSize();
	    buttonItem.setControl(buttonComposite);
	    buttonItem.setSize(buttonItem.computeSize(size.x, size.y));

	    createStyleTextEditor(container);
	
		getShell().setMinimumSize(290,290);
		return container;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:36,代码来源:TransformViewDataDialog.java

示例9: fillCoolBar

@Override
  protected void fillCoolBar(ICoolBarManager coolBar) {
  	super.fillCoolBar(coolBar);
  	IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.LEFT);
coolBar.add(new ToolBarContributionItem(toolbar, HYDROGRAPH_UI_GRAPH_TOOLBAR_ID));

  }
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:7,代码来源:ApplicationActionBarAdvisor.java

示例10: BookButtonBar

BookButtonBar(Composite parent, int gridStyle) {
    toolbar = new ToolBar(parent, SWT.FLAT | SWT.NO_FOCUS);
    gd = new GridData(gridStyle);
    toolbar.setLayoutData(gd);

    for (Command cmd : cmds) {
        addIconButton(toolbar, cmd);
    }
    BookNotifier.getInstance().addListener(this);
    refresh();
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:11,代码来源:BookButtonBar.java

示例11: getToolBarStyle

@Override
public int getToolBarStyle(String toolBarId) {
	if (TOP_TOOLBAR_ID.equals(toolBarId)) {
		return SWT.HORIZONTAL | SWT.FLAT;
	}
	return SWT.HORIZONTAL | SWT.FLAT | SWT.BEGINNING;
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:7,代码来源:StudioToolBarConfigurationImpl.java

示例12: getToolBarStyle

@Override
public int getToolBarStyle(String toolBarId) {
	int style = SWT.HORIZONTAL | SWT.FLAT;// | SWT.BEGINNING)
	Kind toolBarKind = getToolBarKind(toolBarId);
	if (isLeftAlignment(toolBarKind)) {
		style = style | SWT.BEGINNING;
	}
	return style;
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:9,代码来源:SchemaToolBarConfigurationImpl.java

示例13: KTable

/**
 * Creates a new KTable.
 * 
 * possible styles: SWT.V_SCROLL - show vertical scrollbar and allow
 * vertical scrolling by arrow keys SWT.H_SCROLL - show horizontal scrollbar
 * and allow horizontal scrolling by arrow keys SWT.FLAT - no border
 * drawing.
 * 
 * After creation a table model should be added using setModel().
 */
public KTable(Composite parent, int style) {
  // Oberklasse initialisieren
  super(parent, SWT.NO_BACKGROUND | SWT.NO_REDRAW_RESIZE | style);

  // inits
  m_GC = new GC(this);
  m_Display = Display.getCurrent();
  m_Selection = new HashMap<Object, Object>();
  m_CellEditor = null;

  flatStyleSpecified = ((style | SWT.FLAT) == style);

  m_RowSelectionMode = false;
  m_MultiSelectMode = false;
  m_TopRow = 0;
  m_LeftColumn = 0;
  m_FocusRow = 0;
  m_FocusCol = 0;
  m_RowsVisible = 0;
  m_RowsFullyVisible = 0;
  m_ColumnsVisible = 0;
  m_ColumnsFullyVisible = 0;
  m_ResizeColumnIndex = -1;
  m_ResizeRowIndex = -1;
  m_ResizeRowTop = -1;
  m_NewRowSize = -1;
  m_ResizeColumnLeft = -1;
  m_Capture = false;
  m_ClickColumnIndex = -1;
  m_ClickRowIndex = -1;

  m_LineRestore = null;
  m_LineX = 0;
  m_LineY = 0;

  cellSelectionListeners = new ArrayList<KTableCellSelectionListener>(10);
  cellResizeListeners = new ArrayList<KTableCellResizeListener>(10);

  // Listener
  createListeners();

}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:52,代码来源:KTable.java

示例14: createControl

public void createControl(Composite parent) {
	control = new SashForm(parent, SWT.VERTICAL | SWT.FLAT);
	createTableTreeViewer(control);
	createEyeViewControl(control);
	control.setWeights(new int[] { 60, 40 });
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:6,代码来源:DbToolGefEditorOutlinePage.java


注:本文中的org.eclipse.swt.SWT.FLAT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。