Bug 238835 - computerContainerSize() hard codes minimum size and cannot be overridden
Summary: computerContainerSize() hard codes minimum size and cannot be overridden
Status: NEW
Alias: None
Product: GEF
Classification: Tools
Component: GEF-Legacy Zest (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows Server 2003
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gef-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-27 14:41 EDT by Stefan Tucker CLA
Modified: 2015-01-22 02:43 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.