⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buttonbarparseargs.java

📁 文字信息巡回显示Java小程序
💻 JAVA
字号:
import java.awt.*;
import java.net.*;

public class ButtonBarParseArgs extends ButtonBar {

   public ButtonBarParseArgs(ButtonBar b) {
      String t = b.getParameter("buttnum");

      try { buttnum = Integer.parseInt(t); }
      catch(Exception e) { buttnum = 0; }

		mapx1 = new int[buttnum];		
		mapy1 = new int[buttnum];		
		mapx2 = new int[buttnum];		
		mapy2 = new int[buttnum];		
		
		msgnum = new int[buttnum];
		x1 = new int[buttnum];
		y1 = new int[buttnum];
		left = new boolean[buttnum];
		msgtext = new String[buttnum][15];
		textURL = new String[buttnum][15];
	      
		for(int i = 0; i < buttnum; i++)
		{	
			Boolean boo = new Boolean(false);
			t = b.getParameter("left" + i);
			try { boo = Boolean.valueOf(t); }
			catch(Exception e) { left[i] = false; }
			left[i] = boo.booleanValue();
			
			t = b.getParameter("mapx1" + i);
			try { mapx1[i] = Integer.parseInt(t); }
			catch(Exception e) { mapx1[i] = 0; }
			
			t = b.getParameter("mapy1" + i);
			try { mapy1[i] = Integer.parseInt(t); }
			catch(Exception e) { mapy1[i] = 0; }
			
			t = b.getParameter("mapx2" + i);
			try { mapx2[i] = Integer.parseInt(t); }
			catch(Exception e) { mapx2[i] = 0; }
			
			t = b.getParameter("mapy2" + i);
			try { mapy2[i] = Integer.parseInt(t); }
			catch(Exception e) { mapy2[i] = 0; }
		
			t = b.getParameter("msgnum" + i);
      	try { msgnum[i] = Integer.parseInt(t); }
	      catch(Exception e) { msgnum[i] = 0; }
			
			t = b.getParameter("x1" + i);
			try { x1[i] = Integer.parseInt(t); }
	      catch(Exception e) { x1[i] = 0; }
			t = b.getParameter("y1" + i);
			try { y1[i] = Integer.parseInt(t); }
	      catch(Exception e) { y1[i] = 0; }
		
	      for (int j=0; j<msgnum[i]; j++) {
	         msgtext[i][j] = b.getParameter("msgtext" + i + j);
				try { textURL[i][j] = b.getParameter("textURL" + i + j); }
				catch(Exception e) { textURL[i][j] = ""; }
		
	      }
	  }
	  
	  
      fontname = b.getParameter("font");

      if(fontname == null) {
         fontname = new String("Arial");
      }

      String s = b.getParameter("fontsize");
      try {
         fontsize = Integer.parseInt(s);
      }
      catch(Exception e) {
         fontsize = 36;
      }
	  
   }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -