当前位置: 首页>>代码示例>>Java>>正文


Java Label类代码示例

本文整理汇总了Java中de.lessvoid.nifty.controls.Label的典型用法代码示例。如果您正苦于以下问题:Java Label类的具体用法?Java Label怎么用?Java Label使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Label类属于de.lessvoid.nifty.controls包,在下文中一共展示了Label类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: bind

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
public void bind(Nifty nifty, Screen screen) {
    window = screen.findElementByName("wdDemo").getNiftyControl(Window.class);
    rbHand[0] = screen.findElementByName("rbLeftHand").getNiftyControl(RadioButton.class);
    rbHand[1] = screen.findElementByName("rbRightHand").getNiftyControl(RadioButton.class);
    rbHand[2] = screen.findElementByName("rbBothHands").getNiftyControl(RadioButton.class);
    rbHand[3] = screen.findElementByName("rbAnyHand").getNiftyControl(RadioButton.class);
    lbGrasped = screen.findElementByName("lbGrasped").getNiftyControl(Label.class);
    btRelease = screen.findElementByName("btRelease").getNiftyControl(Button.class);
    btDestroy = screen.findElementByName("btDestroy").getNiftyControl(Button.class);
    btPlaneRotL = screen.findElementByName("btPlaneRotL").getNiftyControl(Button.class);
    btPlaneRotR = screen.findElementByName("btPlaneRotR").getNiftyControl(Button.class);
    sbObjRot[0] = screen.findElementByName("sbObjRotX").getNiftyControl(Scrollbar.class);
    sbObjRot[1] = screen.findElementByName("sbObjRotY").getNiftyControl(Scrollbar.class);
    sbObjRot[2] = screen.findElementByName("sbObjRotZ").getNiftyControl(Scrollbar.class);
    lbObjAngles[0] = screen.findElementByName("lbObjAngleX").getNiftyControl(Label.class);
    lbObjAngles[1] = screen.findElementByName("lbObjAngleY").getNiftyControl(Label.class);
    lbObjAngles[2] = screen.findElementByName("lbObjAngleZ").getNiftyControl(Label.class);
    btRecStart = screen.findNiftyControl("btRecStart", Button.class);
    btRecFinish = screen.findNiftyControl("btRecFinish", Button.class);
    btRecUndo = screen.findNiftyControl("btRecUndo", Button.class);
    nifty.subscribeAnnotations(this);
}
 
开发者ID:dwhuang,项目名称:SMILE,代码行数:23,代码来源:DemoWindowController.java

示例2: bind

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
@Override
public void bind(Nifty nifty, Screen screen) {
    super.bind(nifty, screen);
    // login
    tfEmail = (TextField) nifty.getScreen("start").
            findNiftyControl("tfEmail", TextField.class);
    tfPassword = (TextField) nifty.getScreen("start").
            findNiftyControl("tfPassword", TextField.class);
    lbCheck = (Label) nifty.getScreen("start").
            findNiftyControl("lbCheck", Label.class);
    // register
    tfRegName = (TextField) nifty.getScreen("start").
            findNiftyControl("tfRegName", TextField.class);
    tfRegEmail = (TextField) nifty.getScreen("start").
            findNiftyControl("tfRegEmail", TextField.class);
    tfRegPassword = (TextField) nifty.getScreen("start").
            findNiftyControl("tfRegPassword", TextField.class);
    tfRegPassword2 = (TextField) nifty.getScreen("start").
            findNiftyControl("tfRegPassword2", TextField.class);
    lbRegCheck = (Label) nifty.getScreen("start").
            findNiftyControl("lbRegCheck", Label.class);
}
 
开发者ID:duodecimo,项目名称:magicallyous,代码行数:23,代码来源:MagicallyousScreenController.java

示例3: bind

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
@Override
public void bind(Nifty nifty, Screen screen) {
	window = screen.findElementByName("wdStatus").getNiftyControl(Window.class);
	lbFps = screen.findElementByName("lbFps").getNiftyControl(Label.class);
	lbMatlabStatus = screen.findElementByName("lbMatlabStatus").getNiftyControl(Label.class);
	nifty.subscribeAnnotations(this);
}
 
开发者ID:dwhuang,项目名称:SMILE,代码行数:8,代码来源:StatusWindowController.java

示例4: bind

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public void bind(Nifty nifty, Screen screen) {
	this.nifty = nifty;
	this.screen = screen;
	
    puPause = nifty.createPopup("puPause");
    puMessage = nifty.createPopup("puMessage");
    lbMessage = puMessage.findNiftyControl("lbMessage", Label.class);
    puContextMenu = nifty.createPopup("puContextMenu");
    mnContextMenu = puContextMenu.findNiftyControl("mnContextMenu", MyMenu.class);
    mnContextMenu.addMenuItem("trigger", "Trigger", null);
    mnContextMenu.addMenuItem("pointTo", "Point To", null);
    mnContextMenu.addMenuItem("fasten", "Fasten", null);
    mnContextMenu.addMenuItem("loosen", "Loosen", null);
    
    windowControllers.add(new StatusWindowController());
    windowControllers.add(new CamNavWindowController());
    windowControllers.add(new RobotWindowController());
    windowControllers.add(new DemoWindowController());
    windowControllers.add(new ObjectsWindowController());

    for (WindowController wc : windowControllers) {
        wc.bind(nifty, screen);
        
        Window window = wc.getWindow();
        if (wc.getClass() != StatusWindowController.class) {
        	window.getElement().hide();
        }
    }
    organizeWindows();
}
 
开发者ID:dwhuang,项目名称:SMILE,代码行数:32,代码来源:GuiController.java

示例5: showLoadingPopup

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
public void showLoadingPopup(String text) {
	popupLoading = nifty.createPopup("popupLoading");
	Label loading = popupLoading.findNiftyControl("labelLoading", Label.class);
	loading.setText(text);
	loading.setWidth(null);
	nifty.showPopup(screen, popupLoading.getId(), null);
}
 
开发者ID:AMPBEdu,项目名称:gjOryx,代码行数:8,代码来源:LoginScreen.java

示例6: showErrorPopup

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
public void showErrorPopup(String text) {
	popupError = nifty.createPopup("popupError");
	Label error = popupError.findNiftyControl("labelError", Label.class);
	error.setText(text);
	error.setWidth(null);
	nifty.showPopup(screen, popupError.getId(), null);
}
 
开发者ID:AMPBEdu,项目名称:gjOryx,代码行数:8,代码来源:LoginScreen.java

示例7: showPortalPanel

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
public void showPortalPanel(ObjectStatus status) {
	portalStatus = status;
	panelPortal.show();
	StatData nameStat = status.data.getStat(StatData.NAME);
	if (nameStat != null) {
		panelPortal.findNiftyControl("panelPortalLabel", Label.class).setText(nameStat.valueString);
	} else {
		String id = DatabaseState.getSingleton().getObjectType(status.objectType).id;
		panelPortal.findNiftyControl("panelPortalLabel", Label.class).setText(id);
	}
	panelPortal.resetLayout();
}
 
开发者ID:AMPBEdu,项目名称:gjOryx,代码行数:13,代码来源:WorldScreen.java

示例8: onPanelPortalEnterClick

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
@NiftyEventSubscriber(id="panelPortalEnter")
public void onPanelPortalEnterClick(String st, ButtonClickedEvent evt) {
	String text = panelPortal.findNiftyControl("panelPortalLabel", Label.class).getText();
	WorldState ws = app.getStateManager().getState(WorldState.class);
	UsePortalPacket pkt = new UsePortalPacket();
	pkt.objectId = portalStatus.data.objectId;
	try {
		ws.getClient().sendSyncPacket(pkt);
	} catch (IOException e) {
		e.printStackTrace();
	}
}
 
开发者ID:AMPBEdu,项目名称:gjOryx,代码行数:13,代码来源:WorldScreen.java

示例9: onStartScreen

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void onStartScreen() {
	Chars cs = SettingsState.getSingleton().chars;
	ListBox<CharEntry> list = (ListBox<CharEntry>) screen.findNiftyControl("listboxCharacters", ListBox.class);
	if (cs != null) {
		for (Char c : cs.chars) {
			list.addItem(new CharEntry(c));
		}
	}
	
	CharEntry ce = new CharEntry();
	if (cs.maxNumChars > cs.chars.size()) {
		ce.newChar = true;
	}
	list.addItem(ce);
	list.selectItemByIndex(0);
	
	Label accountName = screen.findNiftyControl("labelAccountName", Label.class);
	accountName.setText(cs.account.name);
	accountName.setWidth(null);
	
	serverSelected = (SettingsState.getSingleton().server != null ? true : false);
	
	if (serverSelected) {
		refreshServerLabel();
	} else {
		List<Server> servers = cs.servers;
		showServerPopup(servers);
	}
}
 
开发者ID:AMPBEdu,项目名称:gjOryx,代码行数:32,代码来源:CharsScreen.java

示例10: refreshServerLabel

import de.lessvoid.nifty.controls.Label; //导入依赖的package包/类
public void refreshServerLabel() {
	Label server = screen.findNiftyControl("labelServer", Label.class);
	server.setText(SettingsState.getSingleton().server.name);
}
 
开发者ID:AMPBEdu,项目名称:gjOryx,代码行数:5,代码来源:CharsScreen.java


注:本文中的de.lessvoid.nifty.controls.Label类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。