Fixed Label lenght
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-extractcodelist-widget@111556 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ffdb919abf
commit
fb773be824
|
@ -8,6 +8,7 @@ import com.allen_sauer.gwt.log.client.Log;
|
|||
import com.google.gwt.user.client.Command;
|
||||
import com.google.gwt.user.client.ui.HorizontalPanel;
|
||||
import com.google.gwt.user.client.ui.VerticalPanel;
|
||||
import com.sencha.gxt.core.client.util.Margins;
|
||||
import com.sencha.gxt.core.client.util.ToggleGroup;
|
||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
|
||||
|
@ -35,12 +36,9 @@ public class ExtractCodelistDetailsCard extends WizardCard {
|
|||
private static final String TABLEDETAILPANELWIDTH = "100%";
|
||||
private static final String TABLEDETAILPANELHEIGHT = "100%";
|
||||
private static final String FORMWIDTH = "538px";
|
||||
|
||||
|
||||
private static final int LABEL_WIDTH = 0;
|
||||
|
||||
|
||||
private static final int LABEL_PAD_WIDTH = 0;
|
||||
|
||||
private static final int LABEL_WIDTH = 128;
|
||||
private static final int LABEL_PAD_WIDTH = 2;
|
||||
|
||||
private ExtractCodelistSession extractCodelistSession;
|
||||
private ExtractCodelistDetailsCard thisCard;
|
||||
|
@ -82,7 +80,7 @@ public class ExtractCodelistDetailsCard extends WizardCard {
|
|||
name.setAllowBlank(false);
|
||||
name.setEmptyText("Enter a name...");
|
||||
name.setAllowBlank(false);
|
||||
p.add(new FieldLabel(name, "Name"), new VerticalLayoutData(1, -1));
|
||||
p.add(new FieldLabel(name, "Name"), new VerticalLayoutData(1, -1,new Margins(0)));
|
||||
|
||||
|
||||
///
|
||||
|
@ -103,10 +101,10 @@ public class ExtractCodelistDetailsCard extends WizardCard {
|
|||
|
||||
new ToolTip(automaticallyAttachPanel, new ToolTipConfig(
|
||||
"Automatically attach the generated codelist"));
|
||||
FieldLabel fieldViewColumns=new FieldLabel(automaticallyAttachPanel, "Automatically Attach");
|
||||
fieldViewColumns.setLabelWidth(LABEL_WIDTH);
|
||||
fieldViewColumns.setLabelPad(LABEL_PAD_WIDTH);
|
||||
p.add(fieldViewColumns, new VerticalLayoutData(1, -1));
|
||||
FieldLabel fieldAttach=new FieldLabel(automaticallyAttachPanel, "Attach");
|
||||
fieldAttach.setLabelWidth(LABEL_WIDTH);
|
||||
fieldAttach.setLabelPad(LABEL_PAD_WIDTH);
|
||||
p.add(fieldAttach, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||
|
||||
|
||||
tableDetailPanel.add(form);
|
||||
|
|
|
@ -59,21 +59,22 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
|
|||
public class TargetColumnsSelectionPanel extends FramedPanel implements
|
||||
CodelistSelectionListener {
|
||||
|
||||
protected static final String COMBO_COLUMN = "comboColumn";
|
||||
protected static final String COMBO_DEF_COLUMN = "comboDefColumn";
|
||||
protected static final String CHECK_NEW = "checkNew";
|
||||
protected static final String WIDTH = "526px";
|
||||
protected static final String HEIGHT = "378px";
|
||||
protected static final String FIELDWIDTH = "526px";
|
||||
protected static final String FIELDSHEIGHT = "336px";
|
||||
protected static final int LABELSIZE = 120;
|
||||
protected static final int COMBOWIDTH = 270;
|
||||
private static final String COMBO_COLUMN = "comboColumn";
|
||||
private static final String COMBO_DEF_COLUMN = "comboDefColumn";
|
||||
private static final String CHECK_NEW = "checkNew";
|
||||
private static final String WIDTH = "526px";
|
||||
private static final String HEIGHT = "378px";
|
||||
private static final String FIELDWIDTH = "526px";
|
||||
private static final String FIELDSHEIGHT = "336px";
|
||||
private static final int LABELSIZE = 120;
|
||||
private static final int LABEL_SIZE_IN_CHAR = 17;
|
||||
private static final int COMBOWIDTH = 270;
|
||||
|
||||
protected TargetColumnsSelectionCard parent;
|
||||
protected TabResource connection;
|
||||
protected ArrayList<ColumnData> connectionColumns;
|
||||
private TargetColumnsSelectionCard parent;
|
||||
private TabResource connection;
|
||||
private ArrayList<ColumnData> connectionColumns;
|
||||
|
||||
protected ArrayList<ExtractCodelistTargetColumn> targetColumns;
|
||||
private ArrayList<ExtractCodelistTargetColumn> targetColumns;
|
||||
|
||||
private ToolBar toolBarHead;
|
||||
|
||||
|
@ -182,10 +183,10 @@ public class TargetColumnsSelectionPanel extends FramedPanel implements
|
|||
String label = new String();
|
||||
if (sourceCol != null && sourceCol.getLabel() != null) {
|
||||
label = SafeHtmlUtils.htmlEscape(sourceCol.getLabel());
|
||||
if (label.length() > LABELSIZE - 1) {
|
||||
label = label.substring(0, LABELSIZE - 3);
|
||||
label += "..";
|
||||
}
|
||||
if (label.length() > LABEL_SIZE_IN_CHAR + 2) {
|
||||
label = label.substring(0, LABEL_SIZE_IN_CHAR);
|
||||
label += "...";
|
||||
}
|
||||
}
|
||||
|
||||
if (connection == null) {
|
||||
|
|
Loading…
Reference in New Issue