} else if (portletAction.equals("conf_resize")) {
DesktopUpdater desktopCommunicator = new DesktopUpdater();
village.webservice.user.Window newWindow[] = new village.webservice.user.Window[1];
DataGetter dataCommunicator = new DataGetter();
Integer i = 0;
village.webservice.user.Window list[] = null;
village.webservice.user.UserData ud = dataCommunicator.get(sid);
list = ud.getWindows();
/* find the window to resize */
String currentRid = list[i].getRid();
if (currentRid.indexOf('@') != -1)
currentRid = currentRid.substring(0, currentRid.indexOf('@'));
System.out.println("Rid = "+rid);
while (!(currentRid.equals(rid.substring(0, rid.indexOf('@'))))) {
System.out.println("CurrentRid = "+currentRid);
i++;
currentRid = list[i].getRid();
if (currentRid.indexOf('@') != -1)
currentRid = currentRid.substring(0, currentRid.indexOf('@'));
}
Integer height = Integer.parseInt(request.getParameter("height"));
Integer width = Integer.parseInt(request.getParameter("width"));
newWindow[0] = list[i];
newWindow[0].setH(height);
newWindow[0].setW(width);
System.out.println("HEIGHT : "+height+", WIDTH : "+width);
desktopCommunicator.updateDesktop(sid, newWindow);
} else if (portletAction.equals("conf_move")) {
DesktopUpdater desktopCommunicator = new DesktopUpdater();
village.webservice.user.Window newWindow[] = new village.webservice.user.Window[1];
DataGetter dataCommunicator = new DataGetter();
Integer i = 0;
village.webservice.user.Window list[] = null;
village.webservice.user.UserData ud = dataCommunicator.get(sid);
list = ud.getWindows();
/* find the window to move */
String currentRid = list[i].getRid();
if (currentRid.indexOf('@') != -1)
currentRid = currentRid.substring(0, currentRid.indexOf('@'));
System.out.println("Rid = "+rid);
while (!(currentRid.equals(rid.substring(0, rid.indexOf('@'))))) {
System.out.println("CurrentRid = "+currentRid);
i++;
currentRid = list[i].getRid();
if (currentRid.indexOf('@') != -1)
currentRid = currentRid.substring(0, currentRid.indexOf('@'));
}
String x_px = request.getParameter("left");
Integer x = Integer.parseInt(x_px.substring(0, x_px.length() - 2));
String y_px = request.getParameter("top");
Integer y = Integer.parseInt(y_px.substring(0, y_px.length() - 2));
newWindow[0] = list[i];
newWindow[0].setX(x);
newWindow[0].setY(y);
System.out.println("MOVE-X : "+x+", MOVE-Y : "+y);
desktopCommunicator.updateDesktop(sid, newWindow);
} else if (portletAction.equals("conf_min")) {
System.out.println("Bylo min\n");
DesktopUpdater desktopCommunicator = new DesktopUpdater();
village.webservice.user.Window newWindow[] = new village.webservice.user.Window[1];
DataGetter dataCommunicator = new DataGetter();
Integer i = 0;
village.webservice.user.Window list[] = null;
village.webservice.user.UserData ud = dataCommunicator.get(sid);
list = ud.getWindows();
/* find the window to min */
String currentRid = list[i].getRid();
if (currentRid.indexOf('@') != -1)
currentRid = currentRid.substring(0, currentRid.indexOf('@'));
System.out.println("Rid = "+rid);
while (!(currentRid.equals(rid.substring(0, rid.indexOf('@'))))) {
System.out.println("CurrentRid = "+currentRid);
i++;
currentRid = list[i].getRid();
if (currentRid.indexOf('@') != -1)
currentRid = currentRid.substring(0, currentRid.indexOf('@'));
}
newWindow[0] = list[i];
System.out.println("[pc]LastMin = "+newWindow[0].getBar());
newWindow[0].setBar(!(newWindow[0].getBar()));
System.out.println("[pc]NextMin = "+newWindow[0].getBar());
desktopCommunicator.updateDesktop(sid, newWindow);
} else if (portletAction.equals("conf_max")) {
System.out.println("Bylo max\n");
DesktopUpdater desktopCommunicator = new DesktopUpdater();
village.webservice.user.Window newWindow[] = new village.webservice.user.Window[1];
DataGetter dataCommunicator = new DataGetter();
Integer i = 0;
village.webservice.user.Window list[] = null;
village.webservice.user.UserData ud = dataCommunicator.get(sid);
list = ud.getWindows();
/* find the window to max */
String currentRid = list[i].getRid();