Revision 9655 trunk/frameworks/_fwAndami/src/com/iver/andami/ui/mdiManager/WindowInfo.java
WindowInfo.java | ||
---|---|---|
572 | 572 |
public static WindowInfo createFromXMLEntity(XMLEntity xml) |
573 | 573 |
{ |
574 | 574 |
WindowInfo result = new WindowInfo(); |
575 |
result.setX(xml.getIntProperty("X")); |
|
576 |
result.setY(xml.getIntProperty("Y")); |
|
577 |
result.setHeight(xml.getIntProperty("Height")); |
|
578 |
result.setWidth(xml.getIntProperty("Width")); |
|
579 |
result.setClosed(xml.getBooleanProperty("isClosed")); |
|
580 |
if (xml.contains("isMaximized")) { |
|
581 |
boolean maximized = xml.getBooleanProperty("isMaximized"); |
|
582 |
result.setMaximized(maximized); |
|
583 |
if (maximized==true) { |
|
584 |
result.setNormalBounds(xml.getIntProperty("normalX"), xml.getIntProperty("normalY"), xml.getIntProperty("normalWidth"), xml.getIntProperty("normalHeight")); |
|
575 |
try { |
|
576 |
result.setX(xml.getIntProperty("X")); |
|
577 |
result.setY(xml.getIntProperty("Y")); |
|
578 |
result.setHeight(xml.getIntProperty("Height")); |
|
579 |
result.setWidth(xml.getIntProperty("Width")); |
|
580 |
result.setClosed(xml.getBooleanProperty("isClosed")); |
|
581 |
if (xml.contains("isMaximized")) { |
|
582 |
boolean maximized = xml.getBooleanProperty("isMaximized"); |
|
583 |
result.setMaximized(maximized); |
|
584 |
if (maximized==true) { |
|
585 |
result.setNormalBounds(xml.getIntProperty("normalX"), xml.getIntProperty("normalY"), xml.getIntProperty("normalWidth"), xml.getIntProperty("normalHeight")); |
|
586 |
} |
|
587 |
else { |
|
588 |
result.setNormalBounds(result.getBounds()); |
|
589 |
} |
|
585 | 590 |
} |
586 |
else { |
|
587 |
result.setNormalBounds(result.getBounds()); |
|
588 |
} |
|
589 | 591 |
} |
592 |
catch (com.iver.utiles.NotExistInXMLEntity ex) { |
|
593 |
PluginServices.getLogger().warn(PluginServices.getText(null, "Window_properties_not_stored_correctly_Window_state_will_not_be_restored")); |
|
594 |
} |
|
590 | 595 |
|
591 | 596 |
return result; |
592 | 597 |
} |
Also available in: Unified diff