use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class UI method comboBox.
public static FieldNode comboBox(Attribute... atts) {
FieldNode fieldNode = new FieldNode(atts);
fieldNode.setAttributes(COMBOBOX);
return fieldNode;
}
use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class UI method radioList.
public static FieldNode radioList(Attribute... atts) {
FieldNode fieldNode = new FieldNode(atts);
fieldNode.setAttributes(RADIO_LIST);
return fieldNode;
}
use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class EntityListTableModel method rebuildColMap.
private void rebuildColMap() {
colMap.clear();
int len = columns.getColumnCount();
for (int i = 0; i < len; i++) {
FieldNode def = columns.getColumn(i);
Property p = def.getProperty(entityType);
if (p != null) {
colMap.put(p, i);
}
}
}
use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class EntityListTableCellRenderer method getTableCellRendererComponent.
@Override
public Component getTableCellRendererComponent(Table table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
EntityListTableModel model = (EntityListTableModel) table.getModel();
FieldNode field = model.getColumnField(column);
FieldNode fieldCopy = field.copy();
fieldCopy.setAttributes(new Editable(false));
Entity entity = model.getEntity(row);
if (entity == null) {
if (parent != null) {
return parent.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
} else {
return new com.codename1.ui.Label();
}
}
return viewFactory.createPropertyView(entity, fieldCopy);
}
use of com.codename1.rad.nodes.FieldNode in project CodeRAD by shannah.
the class PickerPropertyViewBuilder method build.
@Override
public PickerPropertyView build() {
if (fieldNode == null) {
throw new IllegalStateException("PickerPropertyView requires tag to be set");
}
Picker picker = this.picker == null ? new Picker() : this.picker;
String t = getTagName();
if ("raddatePicker".equalsIgnoreCase(t)) {
picker.setType(Display.PICKER_TYPE_DATE);
} else if ("raddateTimePicker".equalsIgnoreCase(t)) {
picker.setType(Display.PICKER_TYPE_DATE_AND_TIME);
} else if ("radtimePicker".equalsIgnoreCase(t)) {
picker.setType(Display.PICKER_TYPE_TIME);
} else if ("radcalendarPicker".equalsIgnoreCase(t)) {
picker.setType(Display.PICKER_TYPE_CALENDAR);
} else if ("raddurationPicker".equalsIgnoreCase(t)) {
picker.setType(Display.PICKER_TYPE_DURATION);
} else if ("raddurationHoursPicker".equalsIgnoreCase(t)) {
picker.setType(Display.PICKER_TYPE_DURATION_HOURS);
} else if ("raddurationMinutesPicker".equalsIgnoreCase(t)) {
picker.setType(Display.PICKER_TYPE_DURATION_MINUTES);
}
return new PickerPropertyView(picker, getEntity(), fieldNode);
}
Aggregations