| 
     
      
      
      From: <kp...@us...> - 2021-03-13 09:34:20
      
     
   | 
Revision: 25426
          http://sourceforge.net/p/jedit/svn/25426
Author:   kpouer
Date:     2021-03-13 09:34:17 +0000 (Sat, 13 Mar 2021)
Log Message:
-----------
minor cleanup
Modified Paths:
--------------
    jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java
Modified: jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java
===================================================================
--- jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java	2021-03-13 09:13:04 UTC (rev 25425)
+++ jEdit/trunk/org/gjt/sp/jedit/gui/statusbar/MemoryStatusWidgetFactory.java	2021-03-13 09:34:17 UTC (rev 25426)
@@ -91,7 +91,7 @@
 			// fucking GTK look and feel
 			Font font = new JLabel().getFont();
 			//Font font = UIManager.getFont("Label.font");
-			MemoryStatus.this.setFont(font);
+			setFont(font);
 
 			FontRenderContext frc = new FontRenderContext(null,true,false);
 			Rectangle2D bounds = font.getStringBounds(
@@ -156,7 +156,7 @@
 		@Override
 		public void actionPerformed(ActionEvent evt)
 		{
-			MemoryStatus.this.repaint();
+			repaint();
 		} //}}}
 
 		//{{{ paintComponent() method
@@ -170,10 +170,8 @@
 			long total = runtime.totalMemory();
 			long used = total - free;
 
-			int width = MemoryStatus.this.getWidth()
-				- insets.left - insets.right;
-			int height = MemoryStatus.this.getHeight()
-				- insets.top - insets.bottom - 1;
+			int width = getWidth() - insets.left - insets.right;
+			int height = getHeight() - insets.top - insets.bottom - 1;
 
 			float fraction = ((float)used) / total;
 
@@ -206,11 +204,11 @@
 				(int)(insets.top + lm.getAscent()));
 
 			g2.setClip(insets.left + (int)(width * fraction),
-				insets.top,MemoryStatus.this.getWidth()
+				insets.top, getWidth()
 				- insets.left - (int)(width * fraction),
 				height);
 
-			g2.setColor(MemoryStatus.this.getForeground());
+			g2.setColor(getForeground());
 
 			g2.drawString(str,
 				insets.left + ((int) (width - bounds.getWidth()) >> 1),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |