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


Java Label类代码示例

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


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

示例1: doAfterCompose

import org.zkoss.zul.Label; //导入依赖的package包/类
@Override
public void doAfterCompose(Component comp) throws Exception {
	super.doAfterCompose(comp);
	
	// Fill grid with forms
	gridForms.getRows().getChildren().clear();
	
	for(Form form : ConfigLoader.getInstance().getForms().queryForAll()) {
		Row row = new Row();
		Cell nameCell = new Cell();
		Cell linkCell = new Cell();
		// Create table name cell
		nameCell.appendChild(new Label(form.getTitle()));
		
		// Create table link cell
		A link = new A();
		link.setTarget("_blank");
		link.setHref("/data/" + form.getName());
		link.setLabel(form.getName());
		linkCell.appendChild(link);
		row.appendChild(nameCell);
		row.appendChild(linkCell);
		gridForms.getRows().appendChild(row);
	}
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:26,代码来源:StartPageComposer.java

示例2: createIdCell

import org.zkoss.zul.Label; //导入依赖的package包/类
private Component createIdCell(IdentityEnum id) {
	if (StringUtils.isNotBlank(id.name())){
		Listcell cell = new Listcell();
		Hlayout h = new Hlayout();
		Image image = new Image();
		image.setSrc((String) IDENTITY_CONVERTER.coerceToUi(id, image));
		image.setWidth("36px");
		Label label = new Label();
		label.setValue((String) IDENTITY_CONVERTER.coerceToUi(id, label));
		h.setSpacing("10px");
		Div div = new Div();
		div.setStyle("margin-top : 7px;");
		
		label.setParent(div);
		image.setParent(h);
		div.setParent(h);
		h.setParent(cell);
		return cell;
	}
	
	return new Listcell();
}
 
开发者ID:Meijinfr,项目名称:Run4WinTournamentManager,代码行数:23,代码来源:ListPlayerRenderer.java

示例3: append

import org.zkoss.zul.Label; //导入依赖的package包/类
private void append(Row row, String label, String toolTip, Component component) {
    Div lbl = new Div();
    lbl.setStyle("text-align: right");
    lbl.appendChild(new Label(label));
    if (StringUtils.isNotBlank(toolTip)) {
        lbl.setTooltiptext(toolTip);
        lbl.setStyle("cursor: help;" + lbl.getStyle());
    }
    row.appendChild(ZKUtils.newCell(lbl));

    if (component instanceof Cell) {
        row.appendChild(component);
    } else {
        row.appendChild(ZKUtils.newCell(modifyComponent(component, toolTip)));
    }
}
 
开发者ID:odelarosa,项目名称:ZkPortal,代码行数:17,代码来源:GridLayout.java

示例4: render

import org.zkoss.zul.Label; //导入依赖的package包/类
@Override
public void render(Row row, final Cost cost, int index) throws Exception {
	row.appendChild(new Label(cost.getDescription()));
	row.appendChild(new Label(DateHelper.getDate(cost.getDate())));
	row.appendChild(new Label(AmountHelper.formatDecimal(cost.getAmount())));
	row.appendChild(new Label(AmountHelper.formatDecimal(cost.getVat())));
	row.appendChild(new Label(cost.getCostType().getOmschrijving()));
	row.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
		public void onEvent(Event event) throws Exception {
			Map<String, Object> arguments = new HashMap<>();
			arguments.put("cost", cost);
			String template = "edit-cost.zul";
			Window window = (Window) Executions.createComponents(template, null, arguments);
			window.doModal();
		}
	});

}
 
开发者ID:beemsoft,项目名称:techytax-zk,代码行数:19,代码来源:CostRowRenderer.java

示例5: render

import org.zkoss.zul.Label; //导入依赖的package包/类
/**
 * Renders a row
 * @param row object where to place information
 * @param object object to be rendered
 * @param i index of the row
 * @throws Exception in case components cannot be added to the row
 */
@Override
public void render(Row row, Object object, int i) throws Exception {
    DateFormat dateFormatter = new SimpleDateFormat(CommonConstants.DATE_FORMAT);
    DateFormat timeFormatter = new SimpleDateFormat(CommonConstants.TIME_FORMAT);
    InstanceChange change = (InstanceChange) object; 
    // the data append to each row with simple label
    row.appendChild(new Label(dateFormatter.format(change.getChangeDate())
                        + " "  + timeFormatter.format(change.getChangeDate())));
    row.appendChild(new Label(change.getAttribute()));
    row.appendChild(new Label(change.getRequester()));
    if (change.getOldValue() != null)
        row.appendChild(getFormattedLabel(change.getOldValue(), 50));
    else
        row.appendChild(new Label("-"));
    if (change.getNewValue() != null)
        row.appendChild(getFormattedLabel(change.getNewValue(), 50));
    else
        row.appendChild(new Label("-"));
}
 
开发者ID:cerndb,项目名称:dbod-webapp,代码行数:27,代码来源:InstanceChangesRenderer.java

示例6: getFormattedLabel

import org.zkoss.zul.Label; //导入依赖的package包/类
/**
 * Formats a label to fit in the grid columns, with no wrap.
 * @param text text to format
 * @param maxLength maximum length of the text
 * @return Label object with the formated text
 */
private Label getFormattedLabel(String text, int maxLength) {
    Label toret = new Label(text);
    toret.setMaxlength(maxLength);
    if (text.length() > maxLength) {
        toret.setTooltiptext(text);
    }
    toret.setStyle("hyphens:none;text-wrap:none;-webkit-hyphens:none;white-space:nowrap;");
    return toret;
}
 
开发者ID:cerndb,项目名称:dbod-webapp,代码行数:16,代码来源:InstanceChangesRenderer.java

示例7: showError

import org.zkoss.zul.Label; //导入依赖的package包/类
/**
 * Displays an error window for the error code provided.
 * @param errorCode error code for the message to be displayed.
 */
private void showError(String errorCode) {
    Window errorWindow = (Window) this.getParent().getFellow("errorWindow");
    Label errorMessage = (Label) errorWindow.getFellow("errorMessage");
    errorMessage.setValue(Labels.getLabel(errorCode));
    try {
        errorWindow.doModal();
    } catch (SuspendNotAllowedException ex) {
        Logger.getLogger(ShutdownController.class.getName()).log(Level.SEVERE, "ERROR SHOWING ERROR WINDOW", ex);
    }
}
 
开发者ID:cerndb,项目名称:dbod-webapp,代码行数:15,代码来源:ShutdownController.java

示例8: showError

import org.zkoss.zul.Label; //导入依赖的package包/类
/**
 * Displays an error window for the error code provided.
 * @param errorCode error code for the message to be displayed.
 * @param exception exception to log
 */
private void showError(String errorCode, Exception exception) {
    if (exception != null) {
        Logger.getLogger(FileController.class.getName()).log(Level.SEVERE, "ERROR DISPATCHING JOB", exception);
    }
    Window errorWindow = (Window) this.getParent().getFellow("errorWindow");
    Label errorMessage = (Label) errorWindow.getFellow("errorMessage");
    errorMessage.setValue(Labels.getLabel(errorCode));
    try {
        errorWindow.doModal();
    } catch (SuspendNotAllowedException ex) {
        Logger.getLogger(FileController.class.getName()).log(Level.SEVERE, "ERROR SHOWING ERROR WINDOW", ex);
    }
}
 
开发者ID:cerndb,项目名称:dbod-webapp,代码行数:19,代码来源:FileController.java

示例9: render

import org.zkoss.zul.Label; //导入依赖的package包/类
@Override
public void render(Row row, Tournament data, int index) throws Exception {
	new Label(data.getStartDate().toString()).setParent(row);
	A link = new A();
	link.setLabel(data.getName());
	link.setHref("/pages/tournament/tournament.zul?id="+data.getId());
	link.setParent(row);
	new Label(data.getAddress().getCountry()+" "+data.getAddress().getCity()+" ("+data.getAddress().getZipCode()+")").setParent(row);
	new Label(data.getParticipants().size()+"/"+data.getNbPlayersMax()).setParent(row);
}
 
开发者ID:Meijinfr,项目名称:Run4Win,代码行数:11,代码来源:TournamentsListRowRenderer.java

示例10: appendPageLinks

import org.zkoss.zul.Label; //导入依赖的package包/类
private void appendPageLinks(String path, File[] files) {
	if (!path.equals("/")){
		Label title = new Label(path);
		title.setSclass("title");
		linkArea.appendChild(title);
	}
	for (File zulFile : files){
		A link = new A(zulFile.getName());
		link.setHref(path+"/"+zulFile.getName());
		linkArea.appendChild(link);
	}
}
 
开发者ID:zkoss,项目名称:zssessentials,代码行数:13,代码来源:IndexComposer.java

示例11: refreshGAList

import org.zkoss.zul.Label; //导入依赖的package包/类
@Command
@NotifyChange(value = { "service_list", "currentState", "userList", "userListbyOffice" })
public void refreshGAList() {
    if (isLogin()) {
        // QLog.l().logger().debug("\n\n\n\nGABOARD VISIBILITY: \n" + CheckGABoard + "\n\n");
        // QLog.l().logger().debug("\n\n\n\nGABOARD VISIBILITY user.getGABoard(): \n" + user.getGABoard() + "\n\n");
        // user.getGABoard()
        if (CheckGABoard == true) {
            // UsersInside.getInstance().getUsersInside()
            // .put(user.getName() + user.getPassword(), new Date().getTime());
            // QSessions.getInstance()
            // .update(user.getUser().getId(), Sessions.getCurrent().getRemoteHost(),
            // Sessions.getCurrent().getRemoteAddr().getBytes());
            ////
            // Long userId = user.getUser().getId();
            // QUser quser = QUserList.getInstance().getById(userId);
            // quser.setCurrentState(currentState);

            // aftercompose(#GAManagementDialog);
            GAManagementDialogWindow.doModal();
            Label CW = (Label) GAManagementDialogWindow.getFellow("GA_CW");
            String S_CW = new Integer(getCustomersCount()).toString();
            CW.setValue(S_CW);

            Label SC = (Label) GAManagementDialogWindow.getFellow("GA_SC");
            String S_SC = new Integer(servingCSR()).toString();
            SC.setValue(S_SC);

            Label LC = (Label) GAManagementDialogWindow.getFellow("GA_LC");
            String S_LC = new Integer(LogginCSR()).toString();
            LC.setValue(S_LC);
        }
        // BindUtils.postNotifyChange(null, null, Form.this, "*");
    }
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:36,代码来源:Form.java

示例12: clickMe

import org.zkoss.zul.Label; //导入依赖的package包/类
@Command("clickMe")
public void clickMe() {
    if (!checkPlugin()) {
        return;
    }

    Integer office_id = getSessionOfficeId();
    PrintRecords records = getPrintRecordsByOfficeId(office_id);
    if (records.isInvited()) {
        records.setInvited(false);
        Clients.evalJavaScript("DHTMLSound()");
    }

    for (int i = 1; i < lines.size(); i++) {
        final Str line = lines.get(i);
        line.clear();
        if (i <= records.getRecords().size()) {
            line.labelA = new Label(
                records.getRecords().get(i - 1).customerPrefix + records.getRecords()
                    .get(i - 1).customerNumber);
            line.labelB = new Label(records.getRecords().get(i - 1).point);

            final boolean blink = (
                records.getRecords().get(i - 1).getState() == CustomerState.STATE_INVITED
                    || records.getRecords().get(i - 1).getState()
                    == CustomerState.STATE_INVITED);
            line.labelA.setClass(blink ? "blink_me" : "no_blink");
            line.labelB.setClass(blink ? "blink_me" : "no_blink");

            line.set();
        }
    }

}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:35,代码来源:QBoard.java

示例13: nuevaCeldaDetalle

import org.zkoss.zul.Label; //导入依赖的package包/类
/**
 * Crea celda tabla.
 * 
 * @param nuevaEtiqueta
 *            Par�metro nueva etiqueta
 * @param style
 *            Par�metro style
 * @return el listcell
 */
public static Listcell nuevaCeldaDetalle(final Label nuevaEtiqueta,
        final String style) {
    final Listcell celdaRetorno = new Listcell();
    if (style != null) {
        celdaRetorno.setStyle(style);
    }
    celdaRetorno.appendChild(nuevaEtiqueta);
    return celdaRetorno;
}
 
开发者ID:GovernIB,项目名称:sistra,代码行数:19,代码来源:GTTUtilsWeb.java

示例14: nuevaEtiquetaDetalle

import org.zkoss.zul.Label; //导入依赖的package包/类
/**
 * M�todo para Nueva etiqueta detalle de la clase GTTUtilsWeb.
 * 
 * @param dato
 *            Par�metro dato
 * @return el label
 */
public static Label nuevaEtiquetaDetalle(final Object dato) {
    final Label labelRetorno = new Label();
    if (dato != null) {
        if (dato instanceof Date) {
            labelRetorno.setValue(dateToString((Date) dato));
        } else {
            labelRetorno.setValue(dato.toString());
        }
    }
    return labelRetorno;
}
 
开发者ID:GovernIB,项目名称:sistra,代码行数:19,代码来源:GTTUtilsWeb.java

示例15: refreshUserList

import org.zkoss.zul.Label; //导入依赖的package包/类
private void refreshUserList() throws SQLException {
	lstUsers.getItems().clear();
	for(User usr : ConfigLoader.getInstance().getUsers().queryForAll()) {
		Listitem item = new Listitem();
		Listcell cell = new Listcell();
		item.setValue(usr);
		cell.appendChild(new Label(usr.getLogin()));
		item.appendChild(cell);
		lstUsers.getItems().add(item);
	}
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:12,代码来源:AdministrationConsoleComposer.java


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