本文整理汇总了Java中org.richfaces.component.UITogglePanel类的典型用法代码示例。如果您正苦于以下问题:Java UITogglePanel类的具体用法?Java UITogglePanel怎么用?Java UITogglePanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UITogglePanel类属于org.richfaces.component包,在下文中一共展示了UITogglePanel类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addFinish
import org.richfaces.component.UITogglePanel; //导入依赖的package包/类
/**
* Agrega un boton de finalización, que invoca a un método.
*
* @param expression
* método que retorna {@link Void} y recibe {@link Void}, esto
* es, no retorna ni recibe nada.
* @return this
*/
public StepBuilder addFinish(final OnClickCallBack callBack,
final SimpleWizard wizard) {
Button last = new Button();
last.setText("KARAKU_WIZARD_FINISH");
last.setStyle(FLOAT_RIGTH);
last.setClickCallBack(new OnClickCallBack() {
@Override
public void onClick() {
UITogglePanel utp = findComponentByID(wizard.getTogglePanelId());
utp.setActiveItem(utp.getFirstItem().getName());
callBack.onClick();
}
});
step.getToolBar().addItem(last);
return this;
}
示例2: addCancelButton
import org.richfaces.component.UITogglePanel; //导入依赖的package包/类
/**
* Agrega un botón que hace desaparecer al wizard
*
* @param wizard
* @return this
*/
public StepBuilder addCancelButton(final SimpleWizard wizard) {
Button cancel = new Button();
cancel.setText("KARAKU_WIZARD_CANCEL");
cancel.setStyle(FLOAT_RIGTH);
cancel.setClickCallBack(new OnClickCallBack() {
@Override
public void onClick() {
UITogglePanel utp = findComponentByID(wizard.getTogglePanelId());
utp.setActiveItem(utp.getFirstItem().getName());
UIPopupPanel upp = findComponentByID(wizard.getPopupId());
upp.setShow(false);
}
});
step.getToolBar().addItem(cancel);
return this;
}
示例3: getSectionId
import org.richfaces.component.UITogglePanel; //导入依赖的package包/类
/**
* Tries to get the id of a parent section if existing.
*
* @param uiComponent
* the component to check the parents for
* @return the id of the section if found or <code>null</code>
*/
private String getSectionId(UIComponent uiComponent) {
UIComponent parent = uiComponent.getParent();
if (parent instanceof UIViewRoot) {
return null;
}
if (parent instanceof UITogglePanel) {
return parent.getId();
}
return getSectionId(parent);
}