- 浏览: 264404 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (152)
- lucene (5)
- java (12)
- eclipse (2)
- GEF (34)
- SWT/JFACE/PLUGIN (58)
- EMF (8)
- GMF (0)
- fckeditor (1)
- AIX (1)
- 云计算 (2)
- 使用 Grails 构建富 Internet 应用程序 (1)
- Grails (1)
- 动态调用动态语言 (2)
- W3C DOM (3)
- Google Maps (1)
- 优化 (1)
- WebSphere (1)
- NSIS (1)
- 计算机安全 (1)
- Mina (2)
- Draw2d (4)
- Compass (1)
- 原创诗集 (3)
- 人生 (1)
- 翻版 (1)
- OSGI (1)
- Ubuntu (2)
- Ireport (2)
最新评论
-
扬手就是一长鞭:
移动label也无法使得save可以执行。
让连线上的Label动起来吧 -
扬手就是一长鞭:
我的save是正常的,我添加删除node或者connectio ...
让连线上的Label动起来吧 -
扬手就是一长鞭:
我也是这扥写的,可是我双击label改变他的文字时,发现sav ...
让连线上的Label动起来吧 -
ae6623:
这段代码放到哪里??
控制拖拽范围 -
ae6623:
真牛!鼠标滚轮缩放GEF画布 ..
getGraphicalV ...
GEF实现用鼠标滑轮控制画布的放大与缩小
如果说只需要改变RCP的皮肤可以参照IBM上的Eclipse程序界面美化技术
http://www.ibm.com/developerworks/cn/opensource/os-cn-ecl-rcprich/
如果想自定义RCP的外观就得用到presentationFactories,presentationFactories是eclipse为editor以及view提供的一个外观工厂,在eclipse官网上推荐的书中就提到过这么个工厂,今天再看MP3MANAGER源代码的时候发现实现起来也挺简单的,不过我还是习惯eclipse风格,所以没将应用的外观改变,之前也一直在寻找改变RCP外观的方法,昨天网友告诉我IBM上有我就去看了下,就是简单的变换了图片和背景颜色,也就是个SWT的皮肤而已,下面我就直接贴代码演示presentationFactories的实现方法
首先就是Presentation 类:
然后就是生产Presentation 的工厂:
重要类:
辅助类:
在plugin.xml中加入
然后在plugin_customization.ini和presentation.ini文件中加入
代码不难摘自MP3M,相信大家能理解,建议大家将这几个类放到自己的UI.PRESENTATION插件中,方便重复调用,最后提醒大家一点,就是如果你设置视图标题栏的弧线形外观,那么你上面的都是无用功了,不会出来效果的
http://www.ibm.com/developerworks/cn/opensource/os-cn-ecl-rcprich/
如果想自定义RCP的外观就得用到presentationFactories,presentationFactories是eclipse为editor以及view提供的一个外观工厂,在eclipse官网上推荐的书中就提到过这么个工厂,今天再看MP3MANAGER源代码的时候发现实现起来也挺简单的,不过我还是习惯eclipse风格,所以没将应用的外观改变,之前也一直在寻找改变RCP外观的方法,昨天网友告诉我IBM上有我就去看了下,就是简单的变换了图片和背景颜色,也就是个SWT的皮肤而已,下面我就直接贴代码演示presentationFactories的实现方法
首先就是Presentation 类:
/******************************************************************************* * Copyright (c) 2009 Siemens AG * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Kai T枚dter - initial API and implementation *******************************************************************************/ package com.siemens.ct.mp3m.ui.presentation; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IPropertyListener; import org.eclipse.ui.presentations.IPresentablePart; import org.eclipse.ui.presentations.IStackPresentationSite; import org.eclipse.ui.presentations.StackDropResult; import org.eclipse.ui.presentations.StackPresentation; public class Presentation extends StackPresentation { private Color borderColor; private IPresentablePart current; private final PaintListener paintListener = new PaintListener() { public void paintControl(final PaintEvent e) { final Rectangle clientArea = presentationControl.getClientArea(); // Image img = new Image(e.display, clientArea.width, // clientArea.height); // GC gc = new GC(img); final GC gc = e.gc; final int border = 1; gc.setLineWidth(border); gc.setForeground(borderColor); gc.drawRectangle(clientArea.x, clientArea.y, clientArea.width - border, clientArea.height - border); // e.gc.drawImage(img, 0, 0); // gc.dispose(); // img.dispose(); } }; /** * Listener attached to all child parts. It responds to changes in part * properties */ private final IPropertyListener partPropertyChangeListener = new IPropertyListener() { public void propertyChanged(final Object source, final int property) { if (source instanceof IPresentablePart) { redraw(); } } }; private Composite presentationControl; private TabContainer tabContainer; private Title titleBar; private Color toolBarColor; public Presentation(final Composite parent, final IStackPresentationSite site) { super(site); // Create a top-level control for the presentation. presentationControl = new Composite(parent, SWT.NONE); borderColor = new Color(presentationControl.getDisplay(), 50, 50, 50); toolBarColor = new Color(presentationControl.getDisplay(), 203, 220, 235); presentationControl.addPaintListener(paintListener); titleBar = new Title(presentationControl, SWT.NONE, getSite()); tabContainer = new TabContainer(presentationControl, SWT.NONE); /* * Add a dispose listener. Important because dispose() may // not always * be called. */ presentationControl.addDisposeListener(new DisposeListener() { public void widgetDisposed(final DisposeEvent e) { presentationDisposed(); } }); } protected Presentation(final IStackPresentationSite stackSite) { super(stackSite); // TODO Auto-generated constructor stub } @Override public void addPart(final IPresentablePart newPart, final Object cookie) { newPart.addPropertyListener(partPropertyChangeListener); tabContainer.addPart(newPart, this, getSite()); } @Override public int computePreferredSize(final boolean width, final int availableParallel, final int availablePerpendicular, final int preferredResult) { if (width) { return Math.max(preferredResult, 100); } else { return tabContainer.getHeight() + titleBar.getHeight(); } } @Override public void dispose() { presentationDisposed(); } @Override public StackDropResult dragOver(final Control currentControl, final Point location) { // TODO Auto-generated method stub return null; } /** * Gets the colorBorder. * * @return Returns the colorBorder. */ public Color getColorBorder() { return borderColor; } @Override public Control getControl() { return presentationControl; } @Override public Control[] getTabList(final IPresentablePart part) { return new Control[] { part.getControl() }; } @Override public void removePart(final IPresentablePart oldPart) { oldPart.removePropertyListener(partPropertyChangeListener); tabContainer.removePart(oldPart); titleBar.removePart(oldPart); if (current == oldPart) { current = null; } redraw(); } @Override public void selectPart(final IPresentablePart toSelect) { // Ignore redundant selections if (toSelect == current) { return; } // If there was an existing part selected, make it invisible if (current != null) { current.setVisible(false); } // Select the new part current = toSelect; // Make the part visible before setBounds, or the call to setBounds // may be ignored. if (current != null) { current.setVisible(true); setBounds(presentationControl.getBounds()); titleBar.setPresentablePart(current); tabContainer.setPresentablePart(current); } } @Override public void setActive(final int newState) { // TODO Auto-generated method stub } @Override public void setBounds(final Rectangle bounds) { // Set the bounds of the presentation widget presentationControl.setBounds(bounds); final int titlebarHeight = titleBar.getHeight(); final Rectangle clientArea = presentationControl.getClientArea(); titleBar .setBounds(clientArea.x + 1, clientArea.y + 1, clientArea.width - 2, titlebarHeight); final int tabPaneHeight = tabContainer.getHeight(); tabContainer.setBounds(clientArea.x, clientArea.y + clientArea.height - tabPaneHeight, clientArea.width, tabPaneHeight); if (current != null) { final Rectangle contentArea = presentationControl.getBounds(); int toolBarHeight = 0; final Control toolBar = current.getToolBar(); if (toolBar != null) { toolBar.setBackground(toolBarColor); toolBarHeight = toolBar.getBounds().height; toolBar.setBounds(clientArea.x + 1, clientArea.y + 1 + titlebarHeight, clientArea.width - 2, toolBarHeight); } contentArea.x += 1; contentArea.y += titlebarHeight + toolBarHeight; contentArea.width -= 2; contentArea.height -= titlebarHeight + tabPaneHeight + toolBarHeight; if (tabPaneHeight == 0) { contentArea.height -= 1; } current.setBounds(contentArea); } } @Override public void setState(final int state) { // TODO Auto-generated method stub } @Override public void setVisible(final boolean isVisible) { // Make the presentation widget visible presentationControl.setVisible(isVisible); titleBar.setVisible(isVisible); // Make the currently visible part visible if (current != null) { current.setVisible(isVisible); if (isVisible) { // Restore the bounds of the currently visible part. // IPartPresentations can be used by multiple // StackPresentations, // although only one such presentation is ever visible at a // time. // It is possible that some other presentation has changed the // bounds of the part since it was last visible, so we need to // update the part's bounds when the presentation becomes // visible. setBounds(presentationControl.getBounds()); } } } @Override public void showPaneMenu() { // TODO Auto-generated method stub } @Override public void showSystemMenu() { // TODO Auto-generated method stub } protected void presentationDisposed() { // Remove any listeners that were attached to any // global Eclipse resources. This is necessary in order to prevent // memory leaks. borderColor.dispose(); toolBarColor.dispose(); presentationControl.removePaintListener(paintListener); presentationControl.dispose(); presentationControl = null; } protected void redraw() { if (presentationControl != null) { presentationControl.redraw(); titleBar.redraw(); tabContainer.redraw(); } } }
然后就是生产Presentation 的工厂:
/******************************************************************************* * Copyright (c) 2009 Siemens AG * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Kai T枚dter - initial API and implementation *******************************************************************************/ package com.siemens.ct.mp3m.ui.presentation; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.presentations.AbstractPresentationFactory; import org.eclipse.ui.presentations.IStackPresentationSite; import org.eclipse.ui.presentations.StackPresentation; public class PresentationFactory extends AbstractPresentationFactory { public StackPresentation createEditorPresentation(Composite parent, IStackPresentationSite site) { return new Presentation(parent, site); } public StackPresentation createViewPresentation(Composite parent, IStackPresentationSite site) { return new Presentation(parent, site); } public StackPresentation createStandaloneViewPresentation(Composite parent, IStackPresentationSite site, boolean showTitle) { return new Presentation(parent, site); } }
重要类:
package com.netunit.workbench.presentation; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseMoveListener; import org.eclipse.swt.events.MouseTrackAdapter; import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Canvas; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.presentations.IPresentablePart; import com.netunit.workbench.Activator; import com.netunit.workbench.intro.Application; /** * 抽象皮肤属性 * @author Ming.He * */ public abstract class AbstractClosable extends Canvas implements PaintListener { protected static Image closeUnselectedImage; //未选中close时的图片 protected static Image closeSelectedImage; //选中close时的图片 protected boolean isCloseSelected; //close是否被选中 protected boolean isMouseOver; //鼠标是否点中 protected IPresentablePart part; //控制view和editor的皮肤 private final MouseMoveListener mouseMoveListener = new MouseMoveListener(){ @Override public void mouseMove(MouseEvent e) { boolean oldState = isCloseSelected; Rectangle clientArea = getBounds(); clientArea.x = clientArea.width - 20; clientArea.width = closeSelectedImage.getBounds().width; clientArea.y = 2; clientArea.height = closeSelectedImage.getBounds().height; if(clientArea.contains(e.x, e.y)){ isCloseSelected = true; }else{ isCloseSelected = false; } if(oldState != isCloseSelected){ redraw(); } } }; protected MouseTrackAdapter mouseTrackAdapter = new MouseTrackAdapter(){ @Override public void mouseEnter(MouseEvent e) { isMouseOver = true; redraw(); } @Override public void mouseExit(MouseEvent e) { isMouseOver = false; isCloseSelected = false; redraw(); } }; static{ ImageDescriptor imageDescriptor = Activator.imageDescriptorFromPlugin(Application.ID, "icons/close.gif"); if(null != imageDescriptor){ closeUnselectedImage = imageDescriptor.createImage(); } imageDescriptor = Activator.imageDescriptorFromPlugin(Application.ID, "icons/closeSelected.gif"); if(null != imageDescriptor){ closeSelectedImage = imageDescriptor.createImage(); } } public AbstractClosable(Composite parent, int style) { super(parent, style); addMouseMoveListener(mouseMoveListener); addMouseTrackListener(mouseTrackAdapter); } public void setPresentablePart(IPresentablePart part){ this.part = part; setToolTipText(part.getTitleToolTip()); layout(); redraw(); } public int getHeight(){ return 21; } public void removePart(IPresentablePart oldPart){ if(oldPart == part){ part = null; } } protected String shortenText(GC gc, String text, int width){ if(null == text){ return null; } if(gc.textExtent(text, 0).x <= width){ return text; } String eclipse = "..."; int eclipseWidth = gc.textExtent(eclipse, 0).x; int textLength = text.length(); while(textLength >= 0){ String s1 = text.substring(0, textLength); int textWidth = gc.textExtent(s1, 0).x; if(textWidth + eclipseWidth < width){ text = s1 + eclipse; break; } textLength --; } return text; } }
辅助类:
/******************************************************************************* * Copyright (c) 2009 Siemens AG * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Kai T枚dter - initial API and implementation *******************************************************************************/ package com.siemens.ct.mp3m.ui.presentation; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.presentations.IPresentablePart; import org.eclipse.ui.presentations.IStackPresentationSite; public class TabContainer extends Composite { protected List<Tab> tabItems = new ArrayList<Tab>(); protected IPresentablePart part; protected int style; public TabContainer(Composite parent, int style) { super(parent, style); this.style = style; } public void addPart(IPresentablePart part, Presentation presentation, IStackPresentationSite site) { Tab tab = new Tab(this, style, presentation, site); tab.setPresentablePart(part); tabItems.add(tab); redraw(); } public void setPresentablePart(IPresentablePart part) { this.part = part; for (Tab b : tabItems) { b.setSected(b.checkPart(part)); } redraw(); } public int getHeight() { if (tabItems.size() < 2) { return 0; } return tabItems.size() * tabItems.get(0).getHeight() - tabItems.size() + 1; } @Override public void setBounds(int x, int y, int width, int height) { int y2 = 0; int h = 21; for (Tab b : tabItems) { b.setBounds(x, y2, width, h); y2 += 20; } super.setBounds(x, y, width, height); } public void redraw() { if (tabItems.size() < 2) { return; } for (Tab b : tabItems) { b.redraw(); } } public void removePart(IPresentablePart oldPart) { Tab foundTab = null; for (Tab b : tabItems) { if (b.getPart() == oldPart) { foundTab = b; break; } } if (foundTab != null) { tabItems.remove(foundTab); foundTab.dispose(); } } }
/******************************************************************************* * Copyright (c) 2009 Siemens AG * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Kai T枚dter - initial API and implementation *******************************************************************************/ package com.siemens.ct.mp3m.ui.presentation; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.presentations.IPresentablePart; import org.eclipse.ui.presentations.IStackPresentationSite; public class Tab extends AbstractClosable implements PaintListener { private final Presentation presentation; private final IStackPresentationSite site; protected final Color unselectedTop = new Color(getDisplay(), 250, 250, 250); protected final Color unselectedBottom = new Color(getDisplay(), 200, 225, 255); protected final Color selectedTop = new Color(getDisplay(), 250, 230, 150); protected final Color selectedBottom = new Color(getDisplay(), 240, 155, 30); protected final Color mouseOverTop = new Color(getDisplay(), 255, 248, 223); protected final Color mouseOverBottom = new Color(getDisplay(), 255, 225, 120); protected Font font = new Font(getDisplay(), "Default", 10, SWT.NORMAL); private boolean isSelected; /** * This listener responds to selection events in all tabs. */ private final MouseListener mouseListener = new MouseAdapter() { @Override public void mouseDown(MouseEvent e) { if (part != null) { part.setFocus(); if (isCloseSelected()) { site.close(new IPresentablePart[] { part }); } else { site.selectPart(part); presentation.selectPart(part); } } } }; public Tab(Composite parent, int style, Presentation presentation, IStackPresentationSite site) { super(parent, style | SWT.NO_BACKGROUND); this.presentation = presentation; this.site = site; setSected(false); addPaintListener(this); addMouseListener(mouseListener); } @Override public void setPresentablePart(IPresentablePart part) { this.part = part; setToolTipText(part.getTitleToolTip()); layout(); redraw(); } public boolean checkPart(IPresentablePart part) { return (this.part == part); } public void setSected(boolean selected) { isSelected = selected; } /** * Paint the title bar */ public void paintControl(PaintEvent e) { Rectangle clientArea = getBounds(); Image img = new Image(e.display, clientArea.width, clientArea.height); GC gc = new GC(img); gc.setForeground(presentation.getColorBorder()); gc.drawRectangle(0, 0, clientArea.width - 1, clientArea.height - 1); Color colorTop; Color colorBottom; if (isMouseOver) { if (isSelected) { colorTop = selectedBottom; colorBottom = selectedTop; } else { colorTop = mouseOverTop; colorBottom = mouseOverBottom; } } else { if (isSelected) { colorTop = selectedTop; colorBottom = selectedBottom; } else { colorTop = unselectedTop; colorBottom = unselectedBottom; } } gc.setForeground(colorTop); gc.setBackground(colorBottom); gc.fillGradientRectangle(1, 1, clientArea.width - 2, clientArea.height - 2, true); if (part != null) { Image partImage = part.getTitleImage(); gc.drawImage(partImage, 2, 2); Color colorText = new Color(getDisplay(), 0, 0, 0); // gc.setFont(font); gc.setForeground(colorText); String dirty = ""; if (part.isDirty()) { dirty = "*"; } int closeImageOffset = 0; if (part.isCloseable()) { closeImageOffset = 20; } String text = shortenText(gc, dirty + part.getTitle(), clientArea.width - 25 - closeImageOffset); gc.drawText(text, partImage.getBounds().width + 7, 3, true); } if (part.isCloseable()) { if (isCloseSelected) { gc.drawImage(closeSelectedImage, clientArea.width - 20, 3); } else { gc.drawImage(closeUnselectedImage, clientArea.width - 20, 3); } } e.gc.drawImage(img, 0, 0); gc.dispose(); img.dispose(); } public IPresentablePart getPart() { return part; } public boolean isCloseSelected() { return isCloseSelected; } /* * (non-Javadoc) * * @see org.eclipse.swt.widgets.Widget#dispose() */ @Override public void dispose() { unselectedTop.dispose(); unselectedBottom.dispose(); selectedTop.dispose(); selectedBottom.dispose(); mouseOverTop.dispose(); mouseOverBottom.dispose(); font.dispose(); super.dispose(); } }
/******************************************************************************* * Copyright (c) 2009 Siemens AG * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Kai T枚dter - initial API and implementation *******************************************************************************/ package com.siemens.ct.mp3m.ui.presentation; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.presentations.IPresentablePart; import org.eclipse.ui.presentations.IStackPresentationSite; public class Title extends AbstractClosable { private IStackPresentationSite site; Color colorTop = new Color(getDisplay(), 135, 135, 135); Color colorBottom = new Color(getDisplay(), 50, 50, 50); Color colorText = new Color(getDisplay(), 255, 255, 255); protected Font font = new Font(getDisplay(), "Default", 10, SWT.BOLD); /** * This listener responds to selection events in all tab buttons. */ private MouseListener mouseListener = new MouseAdapter() { public void mouseDown(MouseEvent e) { if (part != null) { part.setFocus(); if (isCloseSelected) { site.close(new IPresentablePart[] { part }); } } } }; public Title(Composite parent, int style, IStackPresentationSite site) { super(parent, style | SWT.NO_BACKGROUND); this.site = site; addPaintListener(this); addMouseListener(mouseListener); } /** * Paint the title */ public void paintControl(PaintEvent e) { Rectangle clientArea = getBounds(); Image img = new Image(e.display, clientArea.width, clientArea.height); GC gc = new GC(img); gc.setForeground(colorTop); gc.setBackground(colorBottom); gc.fillGradientRectangle(0, 0, clientArea.width, clientArea.height, true); if (part != null) { gc.setFont(JFaceResources.getBannerFont()); gc.setForeground(colorText); String dirty = ""; if (part.isDirty()) { dirty = "*"; } String text = shortenText(gc,dirty + part.getTitle(), clientArea.width - 30); gc.drawText(text, 5, 2, true); if (part.isCloseable()) { if (isCloseSelected) { gc.drawImage(closeSelectedImage, clientArea.width - 20, 2); } else { gc.drawImage(closeUnselectedImage, clientArea.width - 20, 2); } } } e.gc.drawImage(img, 0, 0); gc.dispose(); img.dispose(); } /* * (non-Javadoc) * * @see org.eclipse.swt.widgets.Widget#dispose() */ @Override public void dispose() { colorTop.dispose(); colorBottom.dispose(); colorText.dispose(); font.dispose(); super.dispose(); } }
在plugin.xml中加入
<extension point="org.eclipse.ui.presentationFactories"> <factory class="com.siemens.ct.mp3m.ui.presentation.PresentationFactory" id="com.siemens.ct.mp3m.ui.presentation.PresentationFactory" name="Siemens CT Presentation"/> </extension>
然后在plugin_customization.ini和presentation.ini文件中加入
org.eclipse.ui/presentationFactoryId=com.siemens.ct.mp3m.ui.presentation.PresentationFactory
代码不难摘自MP3M,相信大家能理解,建议大家将这几个类放到自己的UI.PRESENTATION插件中,方便重复调用,最后提醒大家一点,就是如果你设置视图标题栏的弧线形外观,那么你上面的都是无用功了,不会出来效果的
发表评论
-
选择workspace中的文件对话框
2011-04-09 17:57 1536ElementTreeSelectionDialog dial ... -
在插件中访问StatusLine
2011-01-17 11:26 1100WorkbenchWindow window = Platfr ... -
给RCP添加SVN功能
2011-01-03 17:26 1815三个步骤: 一、下载SVN插件到eclipse; 二、给RCP ... -
获得当前激活状态的Iproject
2010-11-30 12:48 1505/** * 获得当前工程 * @return ... -
让TableViewer支持Tab编辑
2010-10-16 08:57 1925高效的编辑无疑于tab操作,给TableViewer加tab操 ... -
实现Eclipse自身的log管理
2010-01-14 10:58 3266做插件开发的都知道当 ... -
SWT GC重绘心得
2010-01-13 01:10 5195如果有需求要将Composite的边框颜色改成红色,大家肯定就 ... -
在eclipse中获得当前所有打开的editor实例列表
2009-12-18 14:42 1550EditorPart[] parts = Platfor ... -
将应用默认使用XP风格
2009-12-09 16:54 1049从http://www.eclipse.org/swt/jav ... -
RCP中访问StatusLine详解
2009-11-26 15:40 2777首先给大家介绍各种情 ... -
扩展org.eclipse.ui.preferencePages的些许经验
2009-11-13 15:28 2104最近参考Eclipse插件开发 ... -
给视图添加快捷键
2009-10-11 02:46 1004上一篇博文中讲了用扩展的方式添加全局快捷键,现在本文用硬编码的 ... -
添加全局快捷键
2009-10-11 02:38 1411两种方法:一种扩展, ... -
让SWT中的text只能输入数字
2009-10-07 14:51 3141思路:给Text添加键盘输入事件,判断按下的键的ASCII码 ... -
通过ACTION的ID来获得ACTION
2009-09-28 11:43 2827现在又很多需求都需要动态去改变Action的enable/di ... -
动态关闭ViewPart
2009-09-24 18:36 1904IWorkbenchPage page = PlatformU ... -
设置TreeViewer的前景色和背景色
2009-09-23 11:54 1647让TreeViewerLabelProvider实现IColo ... -
给子控件和父控件添加相同的事件
2009-09-18 13:24 1276方法很多种,我这里介绍种最简单易懂的;触发事件得有listen ... -
SWT时间选择器
2009-09-04 16:50 3277package com.netunit.workbench.t ... -
Eclipse常用的视图ID
2009-09-04 11:45 1780CUIPlugin.CVIEW_ID IPageLayo ...
相关推荐
eclipce自定义扩展点创建过程
代码demo和ppt介绍;用org.eclipse.ui.presentationFactories扩展点RCP自定义透视图切换按钮的右键菜单,去除Editor的右键菜单和关闭按钮;
RCP&OSGI;
RCP在线升级RCP在线升级RCP在线升级RCP在线升级RCP在线升级
任何优秀的软件都离不开快捷键功能,如Ctrl+C复制,Ctrl+V粘贴,F5刷新,此文讲述了自定义的Action(不是Command),如何绑定快捷键的方法。此方法进本人亲自试验,绝对可行。
RCP导出EXE 老大难问题。 RCp 程序导出步骤,保证能够导出~
7.外观 30 7.1.向程序中添加视图模板 31 7.2.向应用程序添加VIEW 36 7.3.向VIEW里添加action 40 8.和编辑器一起工作 51 8.1.概述 51 8.2.创建工程 51 8.3.创建并准备domain 模型 51 8.4.在视口中...
Eclipse RCP允许开发者使用eclipse结构风格设计弹性的可扩展的应用程序,可重用Eclipse中已存在的方法和编码模式。俗话说,万事开头难。Eclipse RCP入手可能会比较困难、费时。接下来我们将主要讲述如何让RCP工作. ...
clipse RCP允许开发者使用eclipse结构风格设计弹性的可扩展的应用程序,可重用Eclipse中已存在的方法和编码模式。俗话说,万事开头难。Eclipse RCP入手可能会比较困难、费时。接下来我们将主要讲述如何让RCP工作 ...
RCP 常见的扩展点指南 RCP最精华的部分之一,详细分析了RCP如何建立扩展点的。
Teamcenter二次开发培训教程(RCP,ITK).pdf
RCP系统使用的弹出式日期控件,可切换上月下月,前一年后一年,可选择年、月
有关rcp的内容 是rcp入门的好帮手,rcp自学的好帮手
RCP项目的登录窗体RCP项目的登录窗体RCP项目的登录窗体RCP项目的登录窗体
Eclipse RCP富客户端平台,基于Eclipse开发的。
Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT Eclipse RCP开发教程,RCP入门教程,教你如何使用SWT
索尼 sony rcp 1500 中文操作手册,非常好,是中文的,希望大家多多下载 谢谢谢谢,让我多赚些积分
RCP中文入门教程,RCP中文入门教程,RCP中文入门教程,RCP中文入门教程
RCP常用方法,Java,gui开发绝对经典书
RCP与GEF的课件,简单的介绍了RCP和GEF中的各组件的功能,已经工作流程