本文整理匯總了Java中com.haulmont.cuba.gui.components.TreeTable類的典型用法代碼示例。如果您正苦於以下問題:Java TreeTable類的具體用法?Java TreeTable怎麽用?Java TreeTable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
TreeTable類屬於com.haulmont.cuba.gui.components包,在下文中一共展示了TreeTable類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initPermissionColoredColumns
import com.haulmont.cuba.gui.components.TreeTable; //導入依賴的package包/類
@Override
public void initPermissionColoredColumns(TreeTable<BasicPermissionTarget> screenPermissionsTree) {
screenPermissionsTree.addGeneratedColumn("permissionVariant", entity -> {
PermissionVariant permissionVariant = entity.getPermissionVariant();
if (permissionVariant == PermissionVariant.NOTSET)
return null;
String labelValue = "<span class=\"role-permission-" + permissionVariant.getColor() + "\">" +
messages.getMessage(permissionVariant) + "</span>";
Label label = componentsFactory.createComponent(Label.class);
label.setHtmlEnabled(true);
label.setValue(labelValue);
return label;
});
}
示例2: initPermissionColoredColumns
import com.haulmont.cuba.gui.components.TreeTable; //導入依賴的package包/類
@Override
public void initPermissionColoredColumns(TreeTable<BasicPermissionTarget> specificPermissionsTree) {
specificPermissionsTree.addGeneratedColumn("permissionVariant", entity -> {
PermissionVariant permissionVariant = entity.getPermissionVariant();
if (permissionVariant == PermissionVariant.NOTSET)
return null;
Label label = componentsFactory.createComponent(Label.class);
label.setHtmlEnabled(true);
String labelValue = "<span class=\"role-permission-" + permissionVariant.getColor() + "\">" +
messages.getMessage(permissionVariant) + "</span>";
label.setValue(labelValue);
return label;
});
}
示例3: initPermissionColoredColumns
import com.haulmont.cuba.gui.components.TreeTable; //導入依賴的package包/類
@Override
public void initPermissionColoredColumns(TreeTable screenPermissionsTree) {
screenPermissionsTree.addGeneratedColumn("permissionVariant", new Table.ColumnGenerator<BasicPermissionTarget>() {
@Override
public Component generateCell(BasicPermissionTarget entity) {
Label label = AppConfig.getFactory().createComponent(Label.class);
JLabel jLabel = (JLabel) DesktopComponentsHelper.unwrap(label);
StringBuilder builder = new StringBuilder();
PermissionVariant permissionVariant = entity.getPermissionVariant();
if (permissionVariant != PermissionVariant.NOTSET) {
builder.append("<html>");
builder.append("<font color=\"").append(permissionVariant.getColor()).append("\">")
.append(messages.getMessage(permissionVariant)).append("</font>");
builder.append("</html>");
}
jLabel.setText(builder.toString());
return label;
}
}, Label.class);
}
示例4: initPermissionColoredColumns
import com.haulmont.cuba.gui.components.TreeTable; //導入依賴的package包/類
@Override
public void initPermissionColoredColumns(TreeTable specificPermissionsTree) {
specificPermissionsTree.addGeneratedColumn("permissionVariant", new Table.ColumnGenerator<BasicPermissionTarget>() {
@Override
public Component generateCell(BasicPermissionTarget entity) {
Label label = AppConfig.getFactory().createComponent(Label.class);
JLabel jLabel = (JLabel) DesktopComponentsHelper.unwrap(label);
StringBuilder builder = new StringBuilder();
PermissionVariant permissionVariant = entity.getPermissionVariant();
if (permissionVariant != PermissionVariant.NOTSET) {
builder.append("<html>");
builder.append("<font color=\"").append(permissionVariant.getColor()).append("\">")
.append(messages.getMessage(permissionVariant)).append("</font>");
builder.append("</html>");
}
jLabel.setText(builder.toString());
return label;
}
}, Label.class);
}
示例5: createComponent
import com.haulmont.cuba.gui.components.TreeTable; //導入依賴的package包/類
@Override
public void createComponent() {
resultComponent = (TreeTable) factory.createComponent(TreeTable.NAME);
loadId(resultComponent, element);
createButtonsPanel(resultComponent, element);
}