@@ -118,14 +118,17 @@ private void initializedUIComponents() {
118118
119119 tblEditor .setAutoResizeMode (JTable .AUTO_RESIZE_OFF );
120120 tblEditor .setShowColumns (true );
121+ tblEditor .setFont (getFont ());
121122 setTableRowHeight (0 );
122123
123124 tblEditor .getColumnModel ().addColumnModelListener (tableEditorListener );
124125
125- tblEditor .setDefaultRenderer (String .class , new MultiLineCellRenderer (this .tableEditorKeyListener , this ));
126- tblEditor .setDefaultRenderer (Object .class , new MultiLineCellRenderer (this .tableEditorKeyListener , this ));
127- tblEditor .setDefaultEditor (String .class , new MultiLineCellRenderer (this .tableEditorKeyListener , this ));
128- tblEditor .setDefaultEditor (Object .class , new MultiLineCellRenderer (this .tableEditorKeyListener , this ));
126+ MultiLineCellRenderer cellRenderer = new MultiLineCellRenderer (this .tableEditorKeyListener , this );
127+ MultiLineCellRenderer cellEditor = new MultiLineCellRenderer (this .tableEditorKeyListener , this );
128+ tblEditor .setDefaultRenderer (String .class , cellRenderer );
129+ tblEditor .setDefaultRenderer (Object .class , cellRenderer );
130+ tblEditor .setDefaultEditor (String .class , cellEditor );
131+ tblEditor .setDefaultEditor (Object .class , cellEditor );
129132 tblEditor .registerKeyboardAction (this .tableEditorActions .undo ,
130133 KeyStroke .getKeyStroke (KeyEvent .VK_Z , InputEvent .CTRL_MASK ), JComponent .WHEN_FOCUSED );
131134 tblEditor .registerKeyboardAction (this .tableEditorActions .redo ,
@@ -201,7 +204,7 @@ public void updateEditorLayout() {
201204 getFileEditorState ().setColumnWidths (columnWidths );
202205 }
203206
204- float zoomFactor = calcuateZoomFactor ();
207+ float zoomFactor = calculateZoomFactor ();
205208 for (int i = 0 ; i < currentColumnCount ; ++i ) {
206209 TableColumn column = this .tblEditor .getColumnModel ().getColumn (i );
207210 column .setPreferredWidth (Math .round (columnWidths [i ] * zoomFactor ));
@@ -212,7 +215,7 @@ public void updateEditorLayout() {
212215 panelInfo .setVisible (getFileEditorState ().showInfoPanel ());
213216 }
214217
215- private float calcuateZoomFactor () {
218+ private float calculateZoomFactor () {
216219 float fontHeight = getFontHeight ();
217220 return fontHeight / baseFontHeight ;
218221 }
@@ -386,7 +389,7 @@ public JComponent getPreferredFocusedComponent() {
386389
387390 public void storeCurrentTableLayout () {
388391 int [] widths = getCurrentColumnsWidths ();
389- float zoomFactor = calcuateZoomFactor ();
392+ float zoomFactor = calculateZoomFactor ();
390393 for (int i = 0 ; i < widths .length ; i ++) {
391394 widths [i ] /= zoomFactor ;
392395 }
@@ -459,7 +462,7 @@ protected String generateCsv(Object[][] data) {
459462 }
460463
461464 private int getGlobalFontSize () {
462- return EditorColorsManager .getInstance ().getGlobalScheme ().getEditorFontSize ();
465+ return EditorColorsManager .getInstance ().getGlobalScheme ().getEditorFontSize ();
463466 }
464467
465468 private int getFontHeight () {
0 commit comments