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


Java JFaceResources.getResources方法代码示例

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


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

示例1: ToolBarNavigator

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public ToolBarNavigator ( final Composite parent, final int style, final ViewManager viewManager )
{
    this.viewManager = viewManager;
    this.toolbar = new ToolBar ( parent, style );
    this.resourceManager = new LocalResourceManager ( JFaceResources.getResources ( parent.getDisplay () ) );

    this.toolbar.addDisposeListener ( new DisposeListener () {

        @Override
        public void widgetDisposed ( final DisposeEvent e )
        {
            handleDispose ();
        }
    } );

    viewManager.addViewManagerListener ( this );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:ToolBarNavigator.java

示例2: CommandStackTableViewer

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public CommandStackTableViewer(Composite parent, TableColumnLayout tcl, CommandStackView styleProvider) {
    super(new Table(parent, SWT.FULL_SELECTION | SWT.MULTI | SWT.HIDE_SELECTION | SWT.V_SCROLL | SWT.H_SCROLL));
    this.styleProvider = styleProvider;
    resourceManager = new LocalResourceManager(JFaceResources.getResources(), parent);
    greenBubble = resourceManager.createImage(RCPUtils.getImageDescriptor(CommandStackTableViewer.class, "icons/obj16/ok.png"));
    redBubble = resourceManager.createImage(RCPUtils.getImageDescriptor(CommandStackTableViewer.class, "icons/obj16/nok.png"));
    grayBubble = resourceManager.createImage(RCPUtils.getImageDescriptor(CommandStackTableViewer.class, "icons/obj16/undef.png"));
    waitingImage = resourceManager.createImage(RCPUtils.getImageDescriptor(CommandStackTableViewer.class, "icons/obj16/waiting.png"));

    getTable().setHeaderVisible(true);
    getTable().setLinesVisible(true);
    addFixedColumns(tcl);

    contentProvider = new CommandStackTableContentProvider(this);
    setContentProvider(contentProvider);
    setInput(contentProvider); // ! otherwise refresh() deletes everything...
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:18,代码来源:CommandStackTableViewer.java

示例3: AxesTableHandler

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
/** Initialize
 *  @param parent
 *  @param table_layout
 *  @param operations_manager
 */
public AxesTableHandler(final Composite parent,
        final TableColumnLayout table_layout, final UndoableActionManager operations_manager)
{
    color_registry = new LocalResourceManager(JFaceResources.getResources(), parent);
    this.operations_manager = operations_manager;

    axes_table = new TableViewer(parent,
            SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION
            | SWT.VIRTUAL);
    final Table table = axes_table.getTable();
    table.setHeaderVisible(true);
    table.setLinesVisible(true);

    createColumns(table_layout);

    axes_table.setContentProvider(this);

    createContextMenu();
}
 
开发者ID:kasemir,项目名称:org.csstudio.display.builder,代码行数:25,代码来源:AxesTableHandler.java

示例4: KeyTreeViewer

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public KeyTreeViewer ( final Composite parent )
{
    this.resourceManager = new LocalResourceManager ( JFaceResources.getResources ( parent.getDisplay () ), parent );

    this.viewer = new TreeViewer ( parent );
    this.viewer.getControl ().setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );

    this.viewer.setAutoExpandLevel ( AbstractTreeViewer.ALL_LEVELS );

    this.contentProvider = new ObservableListTreeContentProvider ( new FactoryImpl (), null );
    this.viewer.setContentProvider ( this.contentProvider );
    this.viewer.setLabelProvider ( this.labelProvider = new LabelProviderImpl ( this.resourceManager, this.contentProvider.getRealizedElements () ) );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:14,代码来源:KeyTreeViewer.java

示例5: SimpleRuleStyleGenerator

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public SimpleRuleStyleGenerator ()
{
    this.resourceManager = new LocalResourceManager ( JFaceResources.getResources () );

    this.colorBgDisconnected = new ColorUpdater ( "org.eclipse.scada.core.ui.styles.alarming.disconnected.bg", this.resourceManager, COLOR_DISCONNECTED_BG ); //$NON-NLS-1$
    this.colorBgError = new ColorUpdater ( "org.eclipse.scada.core.ui.styles.alarming.error.bg", this.resourceManager, COLOR_ERROR_BG ); //$NON-NLS-1$
    this.colorBgAlarm = new ColorUpdater ( "org.eclipse.scada.core.ui.styles.alarming.alarm.bg", this.resourceManager, COLOR_ALARM_BG ); //$NON-NLS-1$
    this.colorBgWarning = new ColorUpdater ( "org.eclipse.scada.core.ui.styles.alarming.warning.bg", this.resourceManager, COLOR_WARNING_BG ); //$NON-NLS-1$
    this.colorBgManual = new ColorUpdater ( "org.eclipse.scada.core.ui.styles.alarming.manual.bg", this.resourceManager, COLOR_MANUAL_BG ); //$NON-NLS-1$
    this.colorBgBlock = new ColorUpdater ( "org.eclipse.scada.core.ui.styles.alarming.block.bg", this.resourceManager, COLOR_BLOCK_BG ); //$NON-NLS-1$

    this.colorFgBlock = new ColorUpdater ( "org.eclipse.scada.core.ui.styles.alarming.block.fg", this.resourceManager, COLOR_BLOCK_FG ); //$NON-NLS-1$

    JFaceResources.getColorRegistry ().addListener ( this.listener );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:16,代码来源:SimpleRuleStyleGenerator.java

示例6: BlockControlImage

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public BlockControlImage ( final ControlImage controlImage, final int style, final RegistrationManager registrationManager )
{
    super ( controlImage.getClientSpace (), style );

    this.controlImage = controlImage;

    this.registrationManager = registrationManager;

    setLayout ( new FillLayout () );

    this.icon = new Label ( this, SWT.NONE );
    this.icon.setImage ( getEmptyImage () );
    this.icon.addMouseListener ( new MouseAdapter () {
        @Override
        public void mouseUp ( final MouseEvent e )
        {
            toggleBlock ();
        }
    } );

    this.registrationManager.addListener ( this );

    final LocalResourceManager resources = new LocalResourceManager ( JFaceResources.getResources (), this.icon );

    this.boldFont = resources.createFont ( JFaceResources.getDefaultFontDescriptor ().withStyle ( SWT.BOLD ) );
    this.boldStyler = new Styler () {

        @Override
        public void applyStyles ( final TextStyle textStyle )
        {
            textStyle.font = BlockControlImage.this.boldFont;
        }
    };
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:35,代码来源:BlockControlImage.java

示例7: URLImageLabel

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public URLImageLabel ( final Composite parent, final int style, final DataItemDescriptor descriptor, final URLImageComponent component )
{
    super ( parent, style, null, null );
    this.component = component;

    final GridLayout layout = new GridLayout ( 2, false );
    layout.marginHeight = layout.marginWidth = 3;
    layout.horizontalSpacing = layout.verticalSpacing = 3;

    setLayout ( layout );

    this.resourceManager = new LocalResourceManager ( JFaceResources.getResources () );

    this.controlImage = new ControlImage ( this, this.registrationManager );

    this.label = new Label ( this, SWT.NONE );

    final GridData gd = new GridData ( SWT.CENTER, SWT.CENTER, true, true );
    if ( component.getHeight () != null && component.getWidth () != null )
    {
        gd.minimumHeight = component.getHeight ();
        gd.minimumWidth = component.getWidth ();
        // this.label.setLayoutData ( new GridData ( component.getWidth (), component.getHeight () ) );
        this.label.setSize ( component.getWidth (), component.getHeight () );
    }
    this.label.setLayoutData ( gd );

    if ( descriptor != null )
    {
        this.controlImage.setDetailItem ( descriptor.asItem () );
        this.registrationManager.registerItem ( "value", descriptor.getItemId (), descriptor.getConnectionInformation (), false, false );
    }

    showUrl ( component.getFallbackImageUrl () );

    if ( component.getReloadTimer () != null )
    {
        triggerReload ( component.getReloadTimer () );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:41,代码来源:URLImageLabel.java

示例8: BrowserComponent

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public BrowserComponent ( final Composite parent, final int style, final DataItemDescriptor descriptor, final org.eclipse.scada.vi.details.model.BrowserComponent component )
{
    super ( parent, style, null, null );
    this.component = component;

    final GridLayout layout = new GridLayout ( 2, false );
    layout.marginHeight = layout.marginWidth = 3;
    layout.horizontalSpacing = layout.verticalSpacing = 3;

    setLayout ( layout );

    this.resourceManager = new LocalResourceManager ( JFaceResources.getResources () );

    this.controlImage = new ControlImage ( this, this.registrationManager );

    this.browser = new Browser ( this, SWT.NONE );

    final GridData gd = new GridData ( SWT.CENTER, SWT.CENTER, true, true );
    if ( component.getHeight () != null && component.getWidth () != null )
    {
        gd.minimumHeight = component.getHeight ();
        gd.minimumWidth = component.getWidth ();
        // this.label.setLayoutData ( new GridData ( component.getWidth (), component.getHeight () ) );
        this.browser.setSize ( component.getWidth (), component.getHeight () );
    }
    this.browser.setLayoutData ( gd );

    if ( descriptor != null )
    {
        this.controlImage.setDetailItem ( descriptor.asItem () );
        this.registrationManager.registerItem ( "value", descriptor.getItemId (), descriptor.getConnectionInformation (), false, false );
    }

    showUrl ( makeUrl () );
    if ( component.getReloadTimer () != null && component.getReloadTimer () > 0 )
    {
        triggerReload ( component.getReloadTimer () );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:40,代码来源:BrowserComponent.java

示例9: DataItemToolTip

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public DataItemToolTip ( final Control control, final int style, final boolean manualActivation, final Item item )
{
    super ( control, style, manualActivation );

    this.resourceManager = new LocalResourceManager ( JFaceResources.getResources () );

    this.item = item;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:9,代码来源:DataItemToolTip.java

示例10: createPart

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
@Override
public void createPart ( final Composite parent )
{
    this.resourceManager = new LocalResourceManager ( JFaceResources.getResources () );

    super.createPart ( parent );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:8,代码来源:ManualOverride.java

示例11: start

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public void start ( final BundleContext context ) throws Exception
{
    resources = new LocalResourceManager ( JFaceResources.getResources () );
    super.start ( context );

    plugin = this;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:8,代码来源:Activator.java

示例12: DepcyGraphLabelProvider

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public DepcyGraphLabelProvider(Control owner) {
    LocalResourceManager lrm = new LocalResourceManager(JFaceResources.getResources(), owner);

    colorHighlight = owner.getDisplay().getSystemColor(SWT.COLOR_YELLOW);
    colorLBlue = lrm.createColor(RGB_LBLUE);
    colorLGreen = lrm.createColor(RGB_LGREEN);
    colorDBlue = lrm.createColor(RGB_DBLUE);
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:9,代码来源:DepcyGraphLabelProvider.java

示例13: Preview

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
public Preview(Composite composite) {
          SWTUtils.createLabel(composite, Policy.bind("SVNDecoratorPreferencesPage.preview"));  //$NON-NLS-1$
	fImageCache= new LocalResourceManager(JFaceResources.getResources());
	fViewer = new TreeViewer(composite);
	GridData data = SWTUtils.createHVFillGridData();
	data.heightHint = 225;
	fViewer.getControl().setLayoutData(data);
	fViewer.setContentProvider(this);
	fViewer.setLabelProvider(this);
	fViewer.setInput(ROOT);
	fViewer.expandAll();
}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:13,代码来源:SVNDecoratorPreferencesPage.java

示例14: createPartControl

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite parent) {
    tk = new FormToolkit(parent.getDisplay());

    Composite formWrapper = tk.createComposite(parent);
    GridLayout gl = new GridLayout();
    formWrapper.setLayout(gl);

    form = tk.createScrolledForm(formWrapper);
    form.setText("Style Editor");
    form.setLayoutData(new GridData(GridData.FILL_BOTH));

    gl = new GridLayout();
    form.getBody().setLayout(gl);

    Section section = tk.createSection(form.getBody(), Section.TITLE_BAR);
    section.setText("Colors");
    section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    StyleDefinition def = loadData(parent.getDisplay());

    ManagedForm managedForm = new ManagedForm(tk, form);
    resourceManager = new LocalResourceManager(JFaceResources.getResources());
    new ThemeColorBlock(def, parent.getDisplay(), resourceManager).createContent(managedForm);

    ManagedForm fontsMForm = new ManagedForm(tk, form);
    section = tk.createSection(form.getBody(), Section.TITLE_BAR);
    section.setText("Fonts");
    section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    new ThemeColorBlock(def, parent.getDisplay(), resourceManager).createContent(fontsMForm);
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:32,代码来源:StyleEditor.java

示例15: create

import org.eclipse.jface.resource.JFaceResources; //导入方法依赖的package包/类
@Override
public void create() {
    super.create();
    setTitle("Connect to " + nvl(conf.getName(), conf.getPrimaryConnectionString()));
    setMessage("Please provide your credentials");
    ResourceManager resourceManager = new LocalResourceManager(JFaceResources.getResources(), getShell());
    Image titleImage = resourceManager
            .createImage(RCPUtils.getImageDescriptor(LoginDialog.class, "icons/yamcs_banner.png"));
    setTitleImage(titleImage);
}
 
开发者ID:yamcs,项目名称:yamcs-studio,代码行数:11,代码来源:LoginDialog.java


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