📄 pshelfsnippet1.java
字号:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: PShelfSnippet1.java
package fileexplorer.views;
import org.eclipse.nebula.widgets.pshelf.PShelf;
import org.eclipse.nebula.widgets.pshelf.PShelfItem;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.*;
public class PShelfSnippet1
{
public PShelfSnippet1()
{
}
public static void main(String args[])
{
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
PShelf shelf = new PShelf(shell, 0);
shelf.setBackground(shell.getDisplay().getSystemColor(32));
PShelfItem item1 = new PShelfItem(shelf, 0);
item1.setText("First Item");
item1.setImage(new Image(display, "icons\\30.jpg"));
item1.getBody().setLayout(new FillLayout());
Table table = new Table(item1.getBody(), 0);
TableColumn col1 = new TableColumn(table, 0);
col1.setText("Column");
table.setHeaderVisible(true);
col1.setWidth(100);
TableItem tableItem = new TableItem(table, 0);
tableItem.setText("table item");
PShelfItem item2 = new PShelfItem(shelf, 0);
item2.setText("Second Item");
item2.getBody().setLayout(new FillLayout());
Text text = new Text(item2.getBody(), 64);
text.setText("Blah blah blah");
shell.setSize(200, 200);
shell.open();
while(!shell.isDisposed())
if(!display.readAndDispatch())
display.sleep();
display.dispose();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -