Revision 2907
org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/BytearrayPickerControllerImpl.java | ||
---|---|---|
22 | 22 |
import org.gvsig.tools.swing.api.windowmanager.Dialog; |
23 | 23 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager; |
24 | 24 |
import org.gvsig.tools.swing.api.windowmanager.WindowManager_v2; |
25 |
import static org.gvsig.tools.swing.api.windowmanager.WindowManager_v2.BUTTON_OK; |
|
25 | 26 |
|
26 | 27 |
/** |
27 | 28 |
* |
... | ... | |
200 | 201 |
// |
201 | 202 |
final JTextEditor editor = ToolsSwingLocator.getTextEditorManager().createTextEditor(); |
202 | 203 |
editor.setContents(value); |
204 |
editor.setEditable(isEditable); |
|
203 | 205 |
|
204 | 206 |
WindowManager_v2 winmanager = (WindowManager_v2) ToolsSwingLocator.getWindowManager(); |
205 | 207 |
Dialog dialog = winmanager.createDialog(editor.asJComponent(), title, null, WindowManager_v2.BUTTONS_OK_CANCEL); |
208 |
dialog.setButtonEnabled(BUTTON_OK, isEditable); |
|
206 | 209 |
dialog.addActionListener((ActionEvent e) -> { |
207 | 210 |
if( isEditable && dialog.getAction()==WindowManager_v2.BUTTONS_OK ) { |
208 | 211 |
try { |
Also available in: Unified diff