Lines 288-327
Link Here
|
288 |
outline.registerKeyboardAction( |
288 |
outline.registerKeyboardAction( |
289 |
defaultTreeActionListener, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), JComponent.WHEN_FOCUSED |
289 |
defaultTreeActionListener, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), JComponent.WHEN_FOCUSED |
290 |
); |
290 |
); |
291 |
|
291 |
|
292 |
final Color focusSelectionBackground = outline.getSelectionBackground(); |
292 |
final Color focusSelectionBackground = outline.getSelectionBackground(); |
293 |
final Color focusSelectionForeground = outline.getSelectionForeground(); |
293 |
final Color focusSelectionForeground = outline.getSelectionForeground(); |
294 |
outline.addFocusListener(new java.awt.event.FocusListener(){ |
294 |
outline.addFocusListener(new java.awt.event.FocusListener(){ |
295 |
@Override |
295 |
@Override |
296 |
public void focusGained(java.awt.event.FocusEvent ev) { |
296 |
public void focusGained(java.awt.event.FocusEvent ev) { |
297 |
outline.setSelectionBackground(focusSelectionBackground); |
297 |
outline.setSelectionBackground(focusSelectionBackground); |
298 |
outline.setSelectionForeground(focusSelectionForeground); |
298 |
outline.setSelectionForeground(focusSelectionForeground); |
299 |
} |
299 |
} |
300 |
|
300 |
|
301 |
@Override |
301 |
@Override |
302 |
public void focusLost(java.awt.event.FocusEvent ev) { |
302 |
public void focusLost(java.awt.event.FocusEvent ev) { |
303 |
outline.setSelectionBackground(SheetCell.getNoFocusSelectionBackground()); |
303 |
outline.setSelectionBackground(SheetCell.getNoFocusSelectionBackground()); |
304 |
outline.setSelectionForeground(SheetCell.getNoFocusSelectionForeground()); |
304 |
outline.setSelectionForeground(SheetCell.getNoFocusSelectionForeground()); |
305 |
} |
305 |
} |
306 |
|
306 |
|
307 |
}); |
307 |
}); |
|
|
308 |
outline.setSelectionBackground(SheetCell.getNoFocusSelectionBackground()); |
309 |
outline.setSelectionForeground(SheetCell.getNoFocusSelectionForeground()); |
308 |
TableColumnSelector tcs = Lookup.getDefault ().lookup (TableColumnSelector.class); |
310 |
TableColumnSelector tcs = Lookup.getDefault ().lookup (TableColumnSelector.class); |
309 |
if (tcs != null) { |
311 |
if (tcs != null) { |
310 |
outline.setColumnSelector(tcs); |
312 |
outline.setColumnSelector(tcs); |
311 |
} |
313 |
} |
312 |
|
314 |
|
313 |
if (UIManager.getColor("control") != null) { // NOI18N |
315 |
if (UIManager.getColor("control") != null) { // NOI18N |
314 |
getOutline().setGridColor(UIManager.getColor("control")); // NOI18N |
316 |
getOutline().setGridColor(UIManager.getColor("control")); // NOI18N |
315 |
} |
317 |
} |
316 |
|
318 |
|
317 |
if (DragDropUtilities.dragAndDropEnabled ) {//&& dragActive) { |
319 |
if (DragDropUtilities.dragAndDropEnabled ) {//&& dragActive) { |
318 |
setDragSource(true); |
320 |
setDragSource(true); |
319 |
} |
321 |
} |
320 |
|
322 |
|
321 |
setBorder( BorderFactory.createEmptyBorder() ); |
323 |
setBorder( BorderFactory.createEmptyBorder() ); |
322 |
|
324 |
|
323 |
initializeTreeScrollSupport(); |
325 |
initializeTreeScrollSupport(); |
324 |
} |
326 |
} |
325 |
|
327 |
|
326 |
private void attachQuickSearch(QuickSearch.Callback callback, boolean asynchronous, JMenu popup) { |
328 |
private void attachQuickSearch(QuickSearch.Callback callback, boolean asynchronous, JMenu popup) { |
327 |
if (quickSearch != null) { |
329 |
if (quickSearch != null) { |