|
From: Robert E. <sky...@us...> - 2006-05-17 11:19:09
|
Update of /cvsroot/jcommander/plugins/org.jcommander.ui.filepanel/src/org/jcommander/ui/filepanel/controls In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv31946/src/org/jcommander/ui/filepanel/controls Modified Files: FilePanel.java Log Message: Partial implementation for feature request [ 1490167 ] Selectable and editable panel location bar The location bar is now focusable and selectable by making use of a text field instead of a label Index: FilePanel.java =================================================================== RCS file: /cvsroot/jcommander/plugins/org.jcommander.ui.filepanel/src/org/jcommander/ui/filepanel/controls/FilePanel.java,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** FilePanel.java 15 May 2006 18:08:50 -0000 1.64 --- FilePanel.java 17 May 2006 11:19:05 -0000 1.65 *************** *** 450,454 **** currentDirectoryLabel = new Text(directoryInfoComposite, SWT.READ_ONLY); ! currentDirectoryLabel.addMouseListener(focusFileTabAdapter); navigationHistoryButton = new Button(directoryInfoComposite, SWT.ARROW | SWT.DOWN); --- 450,477 ---- currentDirectoryLabel = new Text(directoryInfoComposite, SWT.READ_ONLY); ! // currentDirectoryLabel.addMouseListener(focusFileTabAdapter); ! currentDirectoryLabel.addFocusListener(new FocusAdapter() { ! ! public void focusLost(FocusEvent e) { ! currentDirectoryLabel.setBackground(org.eclipse.swt.widgets.Display.getDefault().getSystemColor(org.eclipse.swt.SWT.COLOR_TITLE_BACKGROUND)); ! currentDirectoryLabel.setForeground(org.eclipse.swt.widgets.Display.getDefault().getSystemColor(org.eclipse.swt.SWT.COLOR_LIST_BACKGROUND)); ! } ! ! public void focusGained(FocusEvent e) { ! currentDirectoryLabel.setBackground(org.eclipse.swt.widgets.Display.getDefault().getSystemColor(org.eclipse.swt.SWT.COLOR_LIST_BACKGROUND)); ! currentDirectoryLabel.setForeground(org.eclipse.swt.widgets.Display.getDefault().getSystemColor(org.eclipse.swt.SWT.COLOR_LIST_FOREGROUND)); ! } ! ! }); ! ! currentDirectoryLabel.addKeyListener(new KeyAdapter() { ! ! public void keyPressed(KeyEvent e) { ! if(e.keyCode == SWT.ESC) { ! fileTab.setFocus(); ! } ! } ! ! }); navigationHistoryButton = new Button(directoryInfoComposite, SWT.ARROW | SWT.DOWN); *************** *** 795,797 **** --- 818,824 ---- } } + + public void focusDirectoryInfoPanel() { + this.currentDirectoryLabel.setFocus(); + } } // @jve:decl-index=0:visual-constraint="10,10" |