本文整理匯總了Java中com.simsilica.lemur.Container類的典型用法代碼示例。如果您正苦於以下問題:Java Container類的具體用法?Java Container怎麽用?Java Container使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Container類屬於com.simsilica.lemur包,在下文中一共展示了Container類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: PropertyPanel
import com.simsilica.lemur.Container; //導入依賴的package包/類
protected PropertyPanel( boolean applyStyles, ElementId elementId, String style ) {
super(false, elementId, style);
this.layout = new BorderLayout();
getControl(GuiControl.class).setLayout(layout);
this.container = new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.Even, FillMode.Last),
elementId.child("container"), style);
layout.addChild(container, BorderLayout.Position.Center);
if( applyStyles ) {
Styles styles = GuiGlobals.getInstance().getStyles();
styles.applyStyles(this, elementId, style);
}
}
示例2: initialize
import com.simsilica.lemur.Container; //導入依賴的package包/類
@Override
public void initialize( Container container ) {
label = new Label(getDisplayName() + ":", getElementId().child("float.label"), getStyle());
label.setTextHAlignment(HAlignment.Right);
slider = new Slider( model, Axis.X, getElementId().child("float.slider"), getStyle());
slider.setDelta(step);
//Float current = getValue();
//model.setValue(current);
refresh();
valueText = new Label("", getElementId().child("value.label"), getStyle());
updateText();
value = slider.getModel().createReference();
container.addChild(label);
container.addChild(valueText, 1);
container.addChild(slider, 2);
}
示例3: initialize
import com.simsilica.lemur.Container; //導入依賴的package包/類
@Override
protected void initialize( Application app ) {
screen = new Container(new BorderLayout(), SCREEN_ID);
screen.setBackground(null);
ElementId containerId = CONTAINER_ID;
top = screen.addChild(new Container(new SpringGridLayout(Axis.X, Axis.Y), containerId),
BorderLayout.Position.North);
bottom = screen.addChild(new Container(new SpringGridLayout(Axis.X, Axis.Y), containerId),
BorderLayout.Position.South);
// For now we'll just do this but I think we need a sub container to
// really make things lay out right
left = screen.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.None, FillMode.Last), containerId), BorderLayout.Position.West);
right = screen.addChild(new Container(new SpringGridLayout(Axis.Y, Axis.X, FillMode.None, FillMode.Last), containerId), BorderLayout.Position.East);
}
示例4: getContainer
import com.simsilica.lemur.Container; //導入依賴的package包/類
/**
* Returns the raw container within which the property
* editors are added.
*/
public Container getContainer() {
return container;
}