Spaltenbreiten verbessert durch setExpandRatio
This commit is contained in:
parent
4885b5dc12
commit
1aec8f7fde
@ -1,4 +1,4 @@
|
|||||||
<div style="width:100%; background-color:white;">
|
<div style="width:100%; background-color:white;">
|
||||||
<div style="margin:0px; padding:0px; vertical-align:top; float:left; ">(c) Hostsharing eG, <a href="https://www.hostsharing.net/impressum">Impressum</a></div>
|
<div style="margin:0px; padding:0px; vertical-align:top; float:left; ">(c) Hostsharing eG, <a href="https://www.hostsharing.net/impressum">Impressum</a></div>
|
||||||
<div style="margin:0px; padding:0px; vertical-align:top; text-align:right; ">hsarweb (Vers. 2.0a, 23.05.2011)</div>
|
<div style="margin:0px; padding:0px; vertical-align:top; text-align:right; ">hsarweb (Vers. 2.0b, 25.05.2011)</div>
|
||||||
</div>
|
</div>
|
@ -54,6 +54,7 @@ public class EMailAddressModule extends GenericModule {
|
|||||||
});
|
});
|
||||||
domainProp.setWriteOnce(true);
|
domainProp.setWriteOnce(true);
|
||||||
PropertyConfig targetProp = new PropertyConfig(moduleConfig, "target", String.class, new EMailTargetPropertyFieldFactory(this));
|
PropertyConfig targetProp = new PropertyConfig(moduleConfig, "target", String.class, new EMailTargetPropertyFieldFactory(this));
|
||||||
|
targetProp.setExpandRatio(0.8f);
|
||||||
targetProp.setDefaultValue(new PropertyDefaultValue() {
|
targetProp.setDefaultValue(new PropertyDefaultValue() {
|
||||||
@Override
|
@Override
|
||||||
public String getDefaultValue() {
|
public String getDefaultValue() {
|
||||||
|
@ -38,6 +38,7 @@ public class EMailAliasModule extends GenericModule {
|
|||||||
});
|
});
|
||||||
nameProp.setWriteOnce(true);
|
nameProp.setWriteOnce(true);
|
||||||
PropertyConfig targetProp = new PropertyConfig(moduleConfig, "target", String.class, new EMailTargetPropertyFieldFactory(this));
|
PropertyConfig targetProp = new PropertyConfig(moduleConfig, "target", String.class, new EMailTargetPropertyFieldFactory(this));
|
||||||
|
targetProp.setExpandRatio(0.8f);
|
||||||
targetProp.setDefaultValue(new PropertyDefaultValue() {
|
targetProp.setDefaultValue(new PropertyDefaultValue() {
|
||||||
@Override
|
@Override
|
||||||
public String getDefaultValue() {
|
public String getDefaultValue() {
|
||||||
|
@ -17,7 +17,9 @@ public class QueueTaskModule extends AbstractModule {
|
|||||||
protected void initModule() {
|
protected void initModule() {
|
||||||
moduleConfig = new ModuleConfig("q", getApplication().getLocale());
|
moduleConfig = new ModuleConfig("q", getApplication().getLocale());
|
||||||
moduleConfig.addProperty(new PropertyConfig(moduleConfig, "id", Long.class, PropertyTableColumn.INTERNAL_KEY));
|
moduleConfig.addProperty(new PropertyConfig(moduleConfig, "id", Long.class, PropertyTableColumn.INTERNAL_KEY));
|
||||||
moduleConfig.addProperty(new PropertyConfig(moduleConfig, "title", String.class));
|
PropertyConfig titleProp = new PropertyConfig(moduleConfig, "title", String.class);
|
||||||
|
titleProp.setExpandRatio(0.7f);
|
||||||
|
moduleConfig.addProperty(titleProp);
|
||||||
moduleConfig.addProperty(new PropertyConfig(moduleConfig, "status", String.class));
|
moduleConfig.addProperty(new PropertyConfig(moduleConfig, "status", String.class));
|
||||||
moduleConfig.addProperty(new PropertyConfig(moduleConfig, "started", Date.class, new DatePropertyFieldFactory()));
|
moduleConfig.addProperty(new PropertyConfig(moduleConfig, "started", Date.class, new DatePropertyFieldFactory()));
|
||||||
moduleConfig.addProperty(new PropertyConfig(moduleConfig, "finished", Date.class, new DatePropertyFieldFactory()));
|
moduleConfig.addProperty(new PropertyConfig(moduleConfig, "finished", Date.class, new DatePropertyFieldFactory()));
|
||||||
|
@ -68,6 +68,7 @@ public class UnixUserModule extends GenericModule {
|
|||||||
});
|
});
|
||||||
PropertyConfig passwordProp = new PropertyConfig(moduleConfig, "password", String.class, PropertyTableColumn.NONE, new PasswordPropertyFieldFactory(this));
|
PropertyConfig passwordProp = new PropertyConfig(moduleConfig, "password", String.class, PropertyTableColumn.NONE, new PasswordPropertyFieldFactory(this));
|
||||||
PropertyConfig commentProp = new PropertyConfig(moduleConfig, "comment", String.class);
|
PropertyConfig commentProp = new PropertyConfig(moduleConfig, "comment", String.class);
|
||||||
|
commentProp.setExpandRatio(0.7f);
|
||||||
PropertyConfig shellProp = new PropertyConfig(moduleConfig, "shell", String.class, new SelectPropertyFieldFactory());
|
PropertyConfig shellProp = new PropertyConfig(moduleConfig, "shell", String.class, new SelectPropertyFieldFactory());
|
||||||
shellProp.setDefaultValue(new PropertyDefaultValue() {
|
shellProp.setDefaultValue(new PropertyDefaultValue() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -18,6 +18,7 @@ public class PropertyConfig implements Serializable, PropertyDefaultValue, Prope
|
|||||||
private PropertyDefaultValue defaultValue;
|
private PropertyDefaultValue defaultValue;
|
||||||
private PropertySelectValues selectValues;
|
private PropertySelectValues selectValues;
|
||||||
private boolean showInForm = true;
|
private boolean showInForm = true;
|
||||||
|
private float expandRatio;
|
||||||
|
|
||||||
public PropertyConfig(ModuleConfig moduleConfig, String id, Class<?> clasz) {
|
public PropertyConfig(ModuleConfig moduleConfig, String id, Class<?> clasz) {
|
||||||
this.moduleConfig = moduleConfig;
|
this.moduleConfig = moduleConfig;
|
||||||
@ -27,6 +28,7 @@ public class PropertyConfig implements Serializable, PropertyDefaultValue, Prope
|
|||||||
this.setPropFieldFactory(new DefaultPropertyFieldFactory());
|
this.setPropFieldFactory(new DefaultPropertyFieldFactory());
|
||||||
this.defaultValue = null;
|
this.defaultValue = null;
|
||||||
this.selectValues = null;
|
this.selectValues = null;
|
||||||
|
this.setExpandRatio(0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public PropertyConfig(ModuleConfig moduleConfig, String id, Class<?> clasz, PropertyFieldFactory fieldFactory) {
|
public PropertyConfig(ModuleConfig moduleConfig, String id, Class<?> clasz, PropertyFieldFactory fieldFactory) {
|
||||||
@ -138,4 +140,12 @@ public class PropertyConfig implements Serializable, PropertyDefaultValue, Prope
|
|||||||
showInForm = show;
|
showInForm = show;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float getExpandRatio() {
|
||||||
|
return expandRatio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExpandRatio(float expandRatio) {
|
||||||
|
this.expandRatio = expandRatio;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -71,11 +71,12 @@ public class TableComponentFactory implements ComponentFactory, Serializable {
|
|||||||
table.setSelectable(false);
|
table.setSelectable(false);
|
||||||
table.setImmediate(true);
|
table.setImmediate(true);
|
||||||
table.setColumnCollapsingAllowed(true);
|
table.setColumnCollapsingAllowed(true);
|
||||||
table.setColumnReorderingAllowed(true);
|
table.setColumnReorderingAllowed(false);
|
||||||
for (PropertyConfig prop : config.getPropertyList()) {
|
for (PropertyConfig prop : config.getPropertyList()) {
|
||||||
PropertyTableColumn propTableColumn = prop.getPropTableColumn();
|
PropertyTableColumn propTableColumn = prop.getPropTableColumn();
|
||||||
if (propTableColumn != PropertyTableColumn.NONE) {
|
if (propTableColumn != PropertyTableColumn.NONE) {
|
||||||
table.addContainerProperty(prop.getId(), prop.getType(), prop.getDefaultValue());
|
table.addContainerProperty(prop.getId(), prop.getType(), prop.getDefaultValue());
|
||||||
|
table.setColumnExpandRatio(prop.getId(), prop.getExpandRatio());
|
||||||
table.setColumnHeader(prop.getId(), prop.getLabel());
|
table.setColumnHeader(prop.getId(), prop.getLabel());
|
||||||
if (propTableColumn == PropertyTableColumn.HIDDEN) {
|
if (propTableColumn == PropertyTableColumn.HIDDEN) {
|
||||||
table.setColumnCollapsed(prop.getId(), true);
|
table.setColumnCollapsed(prop.getId(), true);
|
||||||
|
Loading…
Reference in New Issue
Block a user