本文整理汇总了Java中org.gnome.gtk.Frame类的典型用法代码示例。如果您正苦于以下问题:Java Frame类的具体用法?Java Frame怎么用?Java Frame使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Frame类属于org.gnome.gtk包,在下文中一共展示了Frame类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: StatusWidget
import org.gnome.gtk.Frame; //导入依赖的package包/类
public StatusWidget() {
super();
// Just a little space
this.setBorderWidth(2);
// Add a frame to pack the widgets
final Frame frame = new Frame(null);
frame.setShadowType(ShadowType.NONE);
this.packStart(frame, false, false, 0);
// Add the speed label
this.speed = new Label();
frame.add(speed);
// Show the container
frame.showAll();
}
示例2: constructWebcamStats
import org.gnome.gtk.Frame; //导入依赖的package包/类
private void constructWebcamStats(Frame frame) {
final VBox vbox = new VBox(false, 5);
vbox.setBorderWidth(10);
final HBox hbox1 = new HBox(true, 0);
final HBox hbox2 = new HBox(true, 0);
final HBox hbox3 = new HBox(true, 0);
final Label maxLabel = new Label(Translate._("Max. value:"));
final Label minLabel = new Label(Translate._("Min. value:"));
final Label lastLabel = new Label(Translate._("Last value:"));
maxValue = new Label();
minValue = new Label();
lastValue = new Label();
final Thread lastValueDaemon = new Thread(new ValueDaemon(minValue,
maxValue, lastValue), "valueDaemon");
lastValueDaemon.setDaemon(true);
lastValueDaemon.start();
hbox1.add(maxLabel);
hbox1.add(maxValue);
hbox2.add(minLabel);
hbox2.add(minValue);
hbox3.add(lastLabel);
hbox3.add(lastValue);
vbox.packStart(hbox1, false, false, 1);
vbox.packStart(hbox2, false, false, 1);
vbox.packStart(hbox3, false, false, 1);
frame.add(vbox);
}
示例3: ErrorDialog
import org.gnome.gtk.Frame; //导入依赖的package包/类
/**
* Create an <code>ErrorDialog</code> with a <code>title</code>, a
* <code>text</code> and an <code>exception</code>.
*/
public ErrorDialog(Window parent, String title, String text, Throwable exception) {
super(parent, title, text);
// Add details to the dialog
final Expander expander = new Expander(_("Details"));
this.add(expander);
// Add a frame into the expander
final Frame frame = new Frame(null);
expander.add(frame);
// Add a text view with the exception stacktrace
final TextBuffer buffer = new TextBuffer();
final TextView view = new TextView(buffer);
// The view is not editable
view.setEditable(false);
view.setWrapMode(WrapMode.WORD);
// Insert the exception stacktrace
if (exception.getMessage() != null) {
buffer.insert(buffer.getIterStart(), exception.getMessage() + "\n");
}
buffer.insert(buffer.getIterEnd(), UncaughtExceptionLogger.getStackTrace(exception));
// Add the textview inside the frame
frame.add(view);
// Show everything
this.showAll();
}