use of com.servoy.j2db.util.toolbar.Toolbar.ToolbarKey in project servoy-client by Servoy.
the class J2DBClient method fillToolbar.
/**
* @param actions
*/
protected void fillToolbar(Map<String, Action> actions) {
toolbarsPanel.clear();
SortedList<Toolbar.ToolbarKey> sortedList = new SortedList<Toolbar.ToolbarKey>();
createToolBars(sortedList, actions);
int offsetRow = 0;
if (sortedList.size() > 0) {
offsetRow = sortedList.get(0).getRow();
if (offsetRow == -1)
offsetRow = 0;
}
for (ToolbarKey key : sortedList) {
if (toolbarsPanel.getToolBar(key.getToolbar().getName()) == null) {
if (// $NON-NLS-1$
"edit".equals(key.getToolbar().getName())) {
fillBrowseToolbar(key.getToolbar(), actions);
}
toolbarsPanel.addToolbar(key.getToolbar(), key.getRow() - offsetRow);
toolbarsPanel.setToolbarVisible(key.getToolbar().getName(), key.isVisible());
}
}
}
Aggregations