Bug 238835

Summary: computerContainerSize() hard codes minimum size and cannot be overridden
Product: [Tools] GEF Reporter: Stefan Tucker <stefan.tucker>
Component: GEF-Legacy ZestAssignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows Server 2003   
Whiteboard:

Description Stefan Tucker CLA 2008-06-27 14:41:01 EDT
Build ID: I20080617-2000

Steps To Reproduce:
I'd like to use GraphContainer, but do something different for open() and close(). I can override those methods, but I cannot reduce the size of the container. computerContainerSize() is private and can't be overridden, and the constants it uses for minimum height and width cannot be changed.

Here is the relevant code:

private static final int MIN_WIDTH = 250;

private ContainerDimension computeContainerSize()
{
...
	if (labelWidth < MIN_WIDTH) {
		labelWidth = MIN_WIDTH;
		expandGraphLabel.setPreferredSize(labelWidth, labelHeight);
		}
	if (labelHeight < 30) {
		labelHeight = 30;
	}
...
}

It would also be useful to be able to access the private expandGraphLabel member, but that wouldn't be necessary if the GraphContainer's open and close methods handled the common actions (such as setting the expanded state) and then called an overridable function to do the customizable stuff.

More information:
Comment 1 Alexander Nyßen CLA 2015-01-22 02:43:50 EST
Re-assigning back to inbox, as Ian is no longer active committer.