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