MCPcopy Create free account
hub / github.com/GateNLP/gate-core / preferredLayoutSize

Method preferredLayoutSize

src/main/java/gate/swing/MenuLayout.java:54–63  ·  view source on GitHub ↗

Returns the preferred dimensions for this layout given the components in the specified target container. @param target the component which needs to be laid out @see Container @see #minimumLayoutSize

(Container target)

Source from the content-addressed store, hash-verified

52 * @see #minimumLayoutSize
53 */
54 @Override
55 public Dimension preferredLayoutSize(Container target) {
56 int membersCnt = target.getComponentCount();
57 Dimension[] componentPrefSizes = new Dimension[membersCnt];
58 //store the sizes
59 for(int i = 0; i < membersCnt; i++){
60 componentPrefSizes[i] = target.getComponent(i).getPreferredSize();
61 }
62 return getCompositeSize(target, componentPrefSizes);
63 }
64
65 /**
66 * Calculates the size of the target container given the sizes of the

Callers

nothing calls this directly

Calls 2

getCompositeSizeMethod · 0.95
getPreferredSizeMethod · 0.45

Tested by

no test coverage detected