just added a workaround to fit the grid width to the window width
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@178843 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
9efbd07ff7
commit
906e8f8bf1
|
@ -5,6 +5,12 @@
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||||
|
<dependent-module archiveName="ckan-metadata-publisher-widget-1.5.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/ckan-metadata-publisher-widget-TRUNK/ckan-metadata-publisher-widget-TRUNK">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
|
<dependent-module archiveName="workspace-tree-widget-6.25.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/WorkspaceTree-TRUNK/WorkspaceTree-TRUNK">
|
||||||
|
<dependency-type>uses</dependency-type>
|
||||||
|
</dependent-module>
|
||||||
<dependent-module archiveName="gcube-url-shortener-1.5.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-url-shortener/gcube-url-shortener">
|
<dependent-module archiveName="gcube-url-shortener-1.5.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-url-shortener/gcube-url-shortener">
|
||||||
<dependency-type>uses</dependency-type>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</dependent-module>
|
||||||
|
|
|
@ -72,6 +72,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
||||||
private boolean groupingEnabled = false;
|
private boolean groupingEnabled = false;
|
||||||
private NumberFormat number = ConstantsExplorer.numberFormatterKB;
|
private NumberFormat number = ConstantsExplorer.numberFormatterKB;
|
||||||
private final Grid<FileGridModel> grid;
|
private final Grid<FileGridModel> grid;
|
||||||
|
private ColumnModel cm = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new gxt grid filter group panel.
|
* Instantiates a new gxt grid filter group panel.
|
||||||
|
@ -81,7 +82,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
||||||
public GxtGridFilterGroupPanel(boolean group) {
|
public GxtGridFilterGroupPanel(boolean group) {
|
||||||
// setLayout(new FitLayout());
|
// setLayout(new FitLayout());
|
||||||
setId("GxtGridFilterGroupPanel "+Random.nextInt());
|
setId("GxtGridFilterGroupPanel "+Random.nextInt());
|
||||||
ColumnConfig icon = new ColumnConfig(FileModel.ICON, "", 25);
|
ColumnConfig icon = new ColumnConfig(FileModel.ICON, "", 40);
|
||||||
icon.setSortable(false);
|
icon.setSortable(false);
|
||||||
ColumnConfig name = new ColumnConfig(FileGridModel.NAME, FileGridModel.NAME, 280);
|
ColumnConfig name = new ColumnConfig(FileGridModel.NAME, FileGridModel.NAME, 280);
|
||||||
ColumnConfig type = new ColumnConfig(FileGridModel.TYPE, FileGridModel.TYPE, 60);
|
ColumnConfig type = new ColumnConfig(FileGridModel.TYPE, FileGridModel.TYPE, 60);
|
||||||
|
@ -94,7 +95,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
||||||
|
|
||||||
size.setEditor(new CellEditor(new NumberField()));
|
size.setEditor(new CellEditor(new NumberField()));
|
||||||
|
|
||||||
ColumnModel cm = null;
|
|
||||||
|
|
||||||
if(group)
|
if(group)
|
||||||
cm = new ColumnModel(Arrays.asList(icon, name, ownerFullName, type, lastUpdate, size, category));
|
cm = new ColumnModel(Arrays.asList(icon, name, ownerFullName, type, lastUpdate, size, category));
|
||||||
|
@ -463,7 +464,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rename item.
|
* Rename item.//
|
||||||
*
|
*
|
||||||
* @param itemIdentifier the item identifier
|
* @param itemIdentifier the item identifier
|
||||||
* @param newName the new name
|
* @param newName the new name
|
||||||
|
@ -538,7 +539,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the border as on search.
|
* Sets the border as on search.
|
||||||
*
|
*percentulae in java
|
||||||
* @param bool the new border as on search
|
* @param bool the new border as on search
|
||||||
*/
|
*/
|
||||||
public void setBorderAsOnSearch(boolean bool){
|
public void setBorderAsOnSearch(boolean bool){
|
||||||
|
@ -617,7 +618,28 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
||||||
GWT.log("refresh size grid "+width +"; heigth: "+height);
|
GWT.log("refresh size grid "+width +"; heigth: "+height);
|
||||||
this.setSize(width, height);
|
this.setSize(width, height);
|
||||||
cp.setSize(width, height);
|
cp.setSize(width, height);
|
||||||
// grid.setSize(width, height);
|
grid.setWidth(width);
|
||||||
|
int theWidth = Integer.parseInt(width.replace("px", ""));
|
||||||
|
GWT.log("theWidth is "+theWidth);
|
||||||
|
for (int i=1; i<cm.getColumnCount(); i++) {
|
||||||
|
ColumnConfig col = cm.getColumn(i);
|
||||||
|
int percent;
|
||||||
|
if(i==1) {
|
||||||
|
percent = theWidth*30/100;
|
||||||
|
GWT.log("i is: "+i+" percent is "+percent);
|
||||||
|
col.setWidth(percent);
|
||||||
|
}else if (i==cm.getColumnCount()-1){
|
||||||
|
percent = theWidth*10/100;
|
||||||
|
GWT.log("i is last column: "+i+" percent is "+percent);
|
||||||
|
col.setWidth(percent);
|
||||||
|
}else {
|
||||||
|
percent = theWidth*20/100;
|
||||||
|
GWT.log("i is: "+i+" percent is "+percent);
|
||||||
|
col.setWidth(percent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//cp.layout(true);
|
||||||
|
//this.layout(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -339,7 +339,7 @@ public class GxtBottomToolBarItem extends ToolBar {
|
||||||
long intWidth = Long.parseLong(width);
|
long intWidth = Long.parseLong(width);
|
||||||
intWidth = intWidth / 2 - 30; // calculate the center
|
intWidth = intWidth / 2 - 30; // calculate the center
|
||||||
intWidth = intWidth - 60 * 3; // previous buttons
|
intWidth = intWidth - 60 * 3; // previous buttons
|
||||||
GWT.log("refreshSize width is " + width);
|
GWT.log("setItemsNumberToCenter refreshSize width is " + width);
|
||||||
// hpItemsNumber.setWidth(intWidth+"px");
|
// hpItemsNumber.setWidth(intWidth+"px");
|
||||||
hpItemsNumber.setStyleAttribute("margin-left", intWidth + "px");
|
hpItemsNumber.setStyleAttribute("margin-left", intWidth + "px");
|
||||||
hpItemsNumber.layout();
|
hpItemsNumber.layout();
|
||||||
|
|
Loading…
Reference in New Issue