use of javax.swing.plaf.SplitPaneUI in project pcgen by PCGen.
the class FlippingSplitPane method setupExtensions.
// private class KeyboardShiftHomeAction extends AbstractAction
// {
// public void actionPerformed(ActionEvent e)
// {
// centerDividerLocations();
// }
// }
// private class KeyboardShiftEndAction extends AbstractAction
// {
// public void actionPerformed(ActionEvent e)
// {
// resetToPreferredSizes();
// }
// }
/**
* {@code setupExtensions} installs the mouse listener for the popup menu,
* and fixes some egregious defaults in {@code JSplitPane}.
*/
private void setupExtensions() {
SplitPaneUI anUi = getUI();
if (anUi instanceof BasicSplitPaneUI) {
((BasicSplitPaneUI) anUi).getDivider().addMouseListener(new PopupListener());
}
// // See source for JSplitPane for this junk.
// ActionMap map = (ActionMap) UIManager.get("SplitPane.actionMap");
// map.put("selectCenter", new KeyboardShiftHomeAction()); // XXX
// map.put("selectReset", new KeyboardShiftEndAction()); // XXX
// SwingUtilities.replaceUIActionMap(this, map);
// This is *so* much better than squishing the top/left
// component into oblivion.
setResizeWeight(0.5);
}
use of javax.swing.plaf.SplitPaneUI in project pcgen by PCGen.
the class FlippingSplitPane method initComponent.
/**
* {@code initComponent} installs the mouse listener for the popup menu,
* and fixes some egregious defaults in {@code JSplitPane}.
*/
private void initComponent() {
SplitPaneUI anUi = getUI();
if (anUi instanceof BasicSplitPaneUI) {
((BasicSplitPaneUI) anUi).getDivider().addMouseListener(new PopupListener());
}
setResizeWeight(0.5);
baseContext = UIPropertyContext.createContext("dividerPrefs");
setInitialDividerLocation();
}
use of javax.swing.plaf.SplitPaneUI in project adempiere by adempiere.
the class VTreePanel method removeSplitPaneBorder.
// jbInit
private void removeSplitPaneBorder() {
if (centerSplitPane != null) {
SplitPaneUI splitPaneUI = centerSplitPane.getUI();
if (splitPaneUI instanceof BasicSplitPaneUI) {
BasicSplitPaneUI basicUI = (BasicSplitPaneUI) splitPaneUI;
basicUI.getDivider().setBorder(BorderFactory.createEmptyBorder());
}
}
}
Aggregations