joergreichert / spray

Automatically exported from code.google.com/p/spray
1 stars 2 forks source link

Layout application not appropriate #76

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

I know, that the Layout will be refatored soon, but as long as this has not 
happend the current way should be improved, so that the user are not confused:

Actually I think there are multiple issues:

 * when I press for code completion in container ( _ ) then I get proposed: bold, color, figure, fill, italic, witdh
  * bold: only makes sense for fonts, of should it be interpreted as global style for the hole container?
  * color: same as bold
  * italic: same as bold
  * figure: not interpreted in the generator, should be cleaned up as long as it is not supported to not disturb early adopters
  * fill: generates this

        GraphicsAlgorithm containerGa = containerShape.getGraphicsAlgorithm();
        containerGa.setBackground(manageColor(0, 0, 160));

    but is not visible in the diagram - actually I do not think this is the right place to set the background color, this should be only done to PictogramElements like Rectangles, Text and so on. In Graphiti a ContainerShape as well as a Shape are only logical elements that group visible elements. 
   * as said already in fill, ContainerShape as Shape are only logical elements, that will grab their height and width in dependence of the dimension and positions of its visible elements. 

Conclusion: In all places where attributes are allowed, all types of attributes 
are proposed, although only a subset is sensible. Some of the attributes are 
even not supported yet and should be left out as long as they are not 
supported. 
 * container ( ): can't think of any reasonable attribute yet
 * text ( ): only bold, color, fill, italic are sensible - the width should be calculated by the font/style/size + text length (there is a Graphiti operation for that), but maybe despite of that the width is still necessary; figure is not useful for text, should be left out; the fill attribute is actually not applied in the diagram  
 * connection: width, color
 * rectangle: not supported yet, should be left out at all
 * line: width, color

Currently the background color can never be applied, as there is a rectangle 
keyword, but the generator of the Add feature does not generate any code. A 
figure is currently only build up from Texts and Lines. So there is no common 
background color, as the container is just a logical element and no rectangle 
is created in the Add feature.

Original issue reported on code.google.com by de.abg.r...@gmail.com on 10 Nov 2011 at 5:18

GoogleCodeExporter commented 9 years ago

Original comment by de.abg.r...@gmail.com on 10 Nov 2011 at 5:19

GoogleCodeExporter commented 9 years ago
This old way of doing containers is now replaced by the compartments integrated 
into the shape DSL. This issue is therefore not relevant anymore.

Original comment by joswar...@gmail.com on 19 Nov 2012 at 2:04