Multi-Column client window - ID: 2086368

http://sourceforge.net/tracker/?func=detail&atid=879335&aid=2086368&group_id=176962
This commit is contained in:
phib 2009-12-09 23:58:51 +00:00
parent 016b85744a
commit 02678a408d
2 changed files with 30 additions and 3 deletions

View File

@ -424,12 +424,13 @@ public class GridController extends CPanel
// VEditor => this - New Editor value to be updated here (MTable)
vEditor.addVetoableChangeListener(this);
// Add to VPanel
vPanel.addField(vEditor, mField);
vPanel.addFieldBuffered(vEditor, mField);
// APanel Listen to buttons
if (mField.getDisplayType() == DisplayType.Button && m_aPanel != null)
((JButton)vEditor).addActionListener (m_aPanel);
}
} // for all fields
vPanel.addFieldBuffered(null, null); // flush the last one through
// No Included Grid Controller
/*

View File

@ -173,6 +173,10 @@ public final class VPanel extends CTabbedPane
}
};
private VEditor prevEditor = null;
private GridField prevField = null;
private boolean wrap = false;
/** Logger */
private static CLogger log = CLogger.getCLogger (VPanel.class);
@ -203,12 +207,27 @@ public final class VPanel extends CTabbedPane
}
}
} // setMnemonic
/**
* Add Field and Label to Panel
* Add Field and Label to buffer and push buffered field to Panel
* @param editor editor
* @param mField field model
*/
public void addFieldBuffered (VEditor editor, GridField mField)
{
wrap = mField != null ? !mField.isSameLine() : false;
if ( prevEditor != null && prevField != null)
addField(prevEditor, prevField);
prevEditor = editor;
prevField = mField;
}
/**
* Add the previous Field and Label to Panel
* @param editor editor
* @param mField field model
* @param wrap move to next line after this field
*/
public void addField (VEditor editor, GridField mField)
{
//[ 1757088 ]
@ -266,7 +285,10 @@ public final class VPanel extends CTabbedPane
// *** The Label ***
if ( label == null)
{
label = new CLabel("");
label.setName(mField.getColumnName());
}
//
if (mField.isCreateMnemonic())
setMnemonic(label, mField.getMnemonic());
@ -300,6 +322,10 @@ public final class VPanel extends CTabbedPane
{
constraints += mField.isLongField() ? ",spanx" : "";
}
if ( wrap )
{
constraints += ", wrap";
}
// Add Field
//[ 1757088 ]