# HG changeset patch # User Raimund Renkert # Date 1318941203 0 # Node ID 92074508a38759036eaa19aad7f366cd690d1c91 # Parent 51d4b51a51ed9ba54343da3cfb5241f048cd4a10 Added documentation. flys-client/trunk@3003 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 51d4b51a51ed -r 92074508a387 flys-client/ChangeLog --- a/flys-client/ChangeLog Mon Oct 17 17:33:27 2011 +0000 +++ b/flys-client/ChangeLog Tue Oct 18 12:33:23 2011 +0000 @@ -1,3 +1,11 @@ +2011-10-18 Raimund Renkert + + * src/main/java/de/intevation/flys/client/shared/model/Style.java, + src/main/java/de/intevation/flys/client/shared/model/StyleSetting.java, + src/main/java/de/intevation/flys/client/shared/model/CollectionItemAttribute.java, + src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java: + Added documentation. + 2011-10-17 Ingo Weinzierl * src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java: diff -r 51d4b51a51ed -r 92074508a387 flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java Mon Oct 17 17:33:27 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/StyleEditorWindow.java Tue Oct 18 12:33:23 2011 +0000 @@ -67,6 +67,12 @@ GWT.create(CollectionItemAttributeService.class); + /** + * Setup editor dialog. + * @param collection The collection the current theme belongs to. + * @param attributes The collection attributes. + * @param facet The selected facet. + */ public StyleEditorWindow ( Collection collection, CollectionItemAttribute attributes, @@ -82,6 +88,9 @@ } + /** + * Initialize the window and set the layout. + */ protected void init() { setTitle(MSG.properties()); setWidth(270); @@ -94,6 +103,9 @@ } + /** + * Initialize the static window content like buttons and main layout. + */ protected void initPanels() { HLayout buttons = new HLayout(); Button accept = new Button(MSG.label_ok()); @@ -115,16 +127,28 @@ } + /** + * Setter for the parent panel. + * @param panel The panel. + */ public void setThemePanel (ThemePanel panel) { this.panel = panel; } + /** + * this method is called when the user aborts theming. + * @param event The event. + */ public void onClick(ClickEvent event) { this.hide(); } + /** + * This method creates the property grid for available styling attributes. + * @return The layout containing the UI elements. + */ protected VLayout createPropertyGrid() { VLayout properties = new VLayout(); @@ -154,6 +178,15 @@ } + /** + * Create a property form. + * @param dname The display name. + * @param name The property name. + * @param type The property type. + * @param value The current value. + * + * @return The dynamic form for the attribute property. + */ protected DynamicForm createPropertyUI( String dname, String name, @@ -247,6 +280,12 @@ } + /** + * Static method to convert a color from RGB to HTML notation. + * @param rgb String in RGB notation. + * + * @return String in HTML notation. + */ protected static String rgbToHtml(String rgb) { String[] parts = rgb.split(","); int values[] = new int[parts.length]; @@ -270,6 +309,12 @@ } + /** + * Static method to convert a color from HTML to RGB notation. + * @param html String in HTML notation. + * + * @return String in RGB notation. + */ protected static String htmlToRgb(String html) { if (!html.startsWith("#")) { return "0, 0, 0"; @@ -283,6 +328,9 @@ } + /** + * Saves the current style attributes and requests a redraw. + */ protected void saveStyle () { GWT.log("StyleEditorWindow.saveStyle()"); Config config = Config.getInstance(); @@ -310,6 +358,11 @@ } + /** + * Sets a new value for an attribute. + * @param name Attribute name. + * @param value The new value. + */ protected final void setNewValue(String name, String value) { Theme t = facet.getTheme(); Style s = attributes.getStyle(t.getFacet(), t.getIndex()); diff -r 51d4b51a51ed -r 92074508a387 flys-client/src/main/java/de/intevation/flys/client/shared/model/CollectionItemAttribute.java --- a/flys-client/src/main/java/de/intevation/flys/client/shared/model/CollectionItemAttribute.java Mon Oct 17 17:33:27 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/shared/model/CollectionItemAttribute.java Tue Oct 18 12:33:23 2011 +0000 @@ -11,18 +11,34 @@ */ public class CollectionItemAttribute implements Serializable { + /** The list of styles. */ protected List