`
文章列表
public class HelloWorld1 { public static void main(String args[]) { Shell shell = new Shell(); shell.setText("Draw2d Hello World"); shell.setSize(400, 400); shell.open(); // create content 4 shell. createContent4Shell(shell); while (!shell.isDisposed ()) { ...

GEF layers

写道 FigureCanvas (layoutManager=ViewportLayout prefSize=null) |- LayeredPane (layoutManager=StackLayout prefSize=null) |- GuideLayer (layoutManager=null, prefSize=null) |- ScalableLayeredPane (layoutManager=StackLayout prefSize=null) |- LayeredPane (layoutManager=StackLayout prefSize=null) [key = PR ...
public class BenchmarkTextPackage { static class StyledLine extends Figure { Dimension pref; private String text; public Dimension getPreferredSize(int wHint, int hHint) { if (pref == null) pref = FigureUtilities.getTextExtents(text, ...
public class Connection { static String layer1 = "layer1"; static String layer2 = "layer2"; public static void main(String args[]) { Shell shell = new Shell(); shell.setSize(350, 350); shell.open(); shell.setText("Connection Demo"); Lightweigh ...
write object, read object 不一定比自己parse快速,只是简单,可以扩展好。 如例子,文件“c:/temp/f.txt”是一个5万多行的文本文件。   import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.ObjectInputStream; import jav ...
第一个程序: public class FirstZest { public static void main(String[] args) { // SWT Display display = new Display(); Shell shell = new Shell(display); shell.setText("First Zest Program Demo"); shell.se ...
原文链接:http://www.ibm.com/developerworks/cn/opensource/os-cn-zest/#ibm-pcon 此文为原本备份。   文章摘要 本文介绍了如何使用 Eclipse Visualization Toolkit(http://www.eclipse.org/gef/zest/)这个短小精悍的 Java 图形工具库来进行简单的工作流程图 ...

Java Draw2d 目录

 
Java Draw2d 目录1,helloworld (http://xmind.iteye.com/blog/814981)2,Label事件(http://xmind.iteye.com/blog/722505)3,布局管理器 3.1,BorderLayout(http://xmind.iteye.com/blog/814965 )3.2,FlowLayout (http://xmind.iteye.com/blog/814979 )3.3,XYLayout (http://xmind.iteye.com/blog/815183 )3.4,布局管理器 约束(Constraint)(ht ...
图形拖动例子   import org.eclipse.draw2d.ColorConstants; import org.eclipse.draw2d.Figure; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.LightweightSystem; import org.eclipse.draw2d.MouseEvent; import org.eclipse.draw2d.MouseListener; import org.eclipse.draw2d.MouseMotionListener; ...
滚动条 显示 ScrollPaneExample import org.eclipse.draw2d.Figure; import org.eclipse.draw2d.GroupBoxBorder; import org.eclipse.draw2d.LightweightSystem; import org.eclipse.draw2d.LineBorder; import org.eclipse.draw2d.ScrollPane; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets. ...
马桶上水总是漏水,完全拆开发现就是上水完后的小点向下压的时候压缩里面的小垫子,控制上水停止,里面可以是脏了,冲洗完,压紧就没有问题了。   修理完成后,小有成就感噢!重点是压紧。
代码: package com.iteye.xmind.draw2d.version2; import org.eclipse.draw2d.Button; import org.eclipse.draw2d.LightweightSystem; import org.eclipse.draw2d.ScalableFreeformLayeredPane; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyEvent ...
假的长时间运行的程序: proc long_job {} { puts "long_job start" puts "- after 1s start" after 1000 puts "- after 1s start" after 1000 puts "- after 1s start" after 1000 puts "- after 1s start" after 1000 puts "- after 1s start" after 1000 ...
在使用iterator的remove的时候出现了java.lang.IllegalStateException异常,原来是remove的第二次就会异常。iterator的remove后要调用next再可以remove,这个也是比较好理解的一个对象不可以remove多次。
TreeView 使用属性监听感觉比Table复杂一些,写了一个仿照书上的例子:   import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import java.util.ArrayList; import java.util.List; import java.util.Vector; import org.eclipse.jface.viewers.ILabelProviderL ...
Global site tag (gtag.js) - Google Analytics