本文整理匯總了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 );
}
示例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...
}
示例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();
}
示例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 () ) );
}
示例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 );
}
示例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;
}
};
}
示例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 () );
}
}
示例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 () );
}
}
示例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;
}
示例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 );
}
示例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;
}
示例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);
}
示例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();
}
示例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);
}
示例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);
}