當前位置: 首頁>>代碼示例>>Java>>正文


Java Container類代碼示例

本文整理匯總了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);
    }
}
 
開發者ID:jMonkeyEngine-Contributions,項目名稱:Lemur,代碼行數:17,代碼來源:PropertyPanel.java

示例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); 
}
 
開發者ID:jMonkeyEngine-Contributions,項目名稱:Lemur,代碼行數:18,代碼來源:PropertyPanel.java

示例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);        
}
 
開發者ID:Simsilica,項目名稱:SiO2,代碼行數:18,代碼來源:DebugHudState.java

示例4: getContainer

import com.simsilica.lemur.Container; //導入依賴的package包/類
/**
 *  Returns the raw container within which the property
 *  editors are added.
 */
public Container getContainer() {
    return container;
}
 
開發者ID:jMonkeyEngine-Contributions,項目名稱:Lemur,代碼行數:8,代碼來源:PropertyPanel.java


注:本文中的com.simsilica.lemur.Container類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。