CollapsiblePanes content pane should not always have a preffered size

Description

Goal:
--------------------------------------------------------------
CollapsiblePanes should collapse completely by default
--------------------------------------------------------------

Current situation/purpose:
--------------------------------------------------------------
CollapsiblePanes content pane collapes until the minimum preffered size is reached.
--------------------------------------------------------------

Assumptions changes/ToDo's:
--------------------------------------------------------------
Remove preffered size if a collapsible panes "flexible" property gets actiavted.
--------------------------------------------------------------

Environment

None

Activity

Show:
Alexander Schlenker
September 10, 2013, 6:33 AM

CollapsiblePanes now collapse completely by default

FH
September 3, 2013, 7:57 AM

Add code from platform:

/**

  • {@inheritDoc}
    */
    @Override
    public Dimension getPreferredSize()
    {
    if(isCollapsed())
    {
    // ignore user-defined preferred size
    return getUI().getPreferredSize(this);
    }


return super.getPreferredSize();
}

/**

  • {@inheritDoc}
    */
    @Override
    public boolean isPreferredSizeSet()
    {
    if(flexible)
    {
    // stretch according to flexible weight
    return false;
    }


return super.isPreferredSizeSet();
}

JW
September 2, 2013, 9:05 AM

Layouting Issue

Implemented

Assignee

FH

Reporter

JW

Labels

None

Fix versions

Priority

Major