|
|
|
@ -72,6 +72,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
|
|
|
|
private boolean groupingEnabled = false;
|
|
|
|
|
private NumberFormat number = ConstantsExplorer.numberFormatterKB;
|
|
|
|
|
private final Grid<FileGridModel> grid;
|
|
|
|
|
private ColumnModel cm = null;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Instantiates a new gxt grid filter group panel.
|
|
|
|
@ -81,7 +82,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
|
|
|
|
public GxtGridFilterGroupPanel(boolean group) {
|
|
|
|
|
// setLayout(new FitLayout());
|
|
|
|
|
setId("GxtGridFilterGroupPanel "+Random.nextInt());
|
|
|
|
|
ColumnConfig icon = new ColumnConfig(FileModel.ICON, "", 25);
|
|
|
|
|
ColumnConfig icon = new ColumnConfig(FileModel.ICON, "", 40);
|
|
|
|
|
icon.setSortable(false);
|
|
|
|
|
ColumnConfig name = new ColumnConfig(FileGridModel.NAME, FileGridModel.NAME, 280);
|
|
|
|
|
ColumnConfig type = new ColumnConfig(FileGridModel.TYPE, FileGridModel.TYPE, 60);
|
|
|
|
@ -94,7 +95,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
|
|
|
|
|
|
|
|
|
size.setEditor(new CellEditor(new NumberField()));
|
|
|
|
|
|
|
|
|
|
ColumnModel cm = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(group)
|
|
|
|
|
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 newName the new name
|
|
|
|
@ -538,7 +539,7 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Sets the border as on search.
|
|
|
|
|
*
|
|
|
|
|
*percentulae in java
|
|
|
|
|
* @param bool the new border as on search
|
|
|
|
|
*/
|
|
|
|
|
public void setBorderAsOnSearch(boolean bool){
|
|
|
|
@ -617,7 +618,28 @@ public class GxtGridFilterGroupPanel extends LayoutContainer {
|
|
|
|
|
GWT.log("refresh size grid "+width +"; heigth: "+height);
|
|
|
|
|
this.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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|