本文整理汇总了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;
}