Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java HTMLÎļþÎĵµ±à¼­Æ÷ ʹÓà JTextPane

 java HTMLÎļþÎĵµ±à¼­Æ÷ ʹÓà JTextPane 
/* HTMLDocumentEditor.java
* @author: Charles Bell
* @version: May 27, 2002
*/
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.filechooser.*;
import javax.swing.text.*;
import javax.swing.text.html.*;
import javax.swing.undo.*;
/**HTMLÎļþÎĵµ±à¼­Æ÷*/
public class HTMLDocumentEditor extends JFrame implements ActionListener
{
 /** ÉùÃ÷Ò»¸öÍøÒ³Îĵµ¶ÔÏó±äÁ¿*/
 private HTMLDocument document;
 /** ´´½¨Ò»¸öÎı¾±à¼­°å*/
 private JTextPane textPane = new JTextPane();
 private boolean debug = false;
 /** ÉùÃ÷Ò»¸öÎļþ¶ÔÏó±äÁ¿*/
 private File currentFile;
 
 /** ÕìÌýÔÚµ±Ç°ÎĵµÉϵı༭Æ÷ */
 protected UndoableEditListener undoHandler = new UndoHandler();
 
 /** Ìí¼Ó³·Ïû¹ÜÀíÆ÷ */
 protected UndoManager undo = new UndoManager();
 
 /** Ìí¼Ó³·ÏûÕìÌýÆ÷*/
 private UndoAction undoAction = new UndoAction();
 /** Ìí¼Ó»Ö¸´ÕìÌýÆ÷*/
 private RedoAction redoAction = new RedoAction();
 
 /** Ìí¼Ó¼ôÇÐÕìÌýÆ÷*/
 private Action cutAction = new DefaultEditorKit.CutAction();
 /** Ìí¼Ó¸´ÖÆÕìÌýÆ÷*/
 private Action copyAction = new DefaultEditorKit.CopyAction();
 /** Ìí¼ÓÕ³ÌùÕìÌýÆ÷*/
 private Action pasteAction = new DefaultEditorKit.PasteAction();
 
 /** Ìí¼Ó¼Ó´ÖÕìÌýÆ÷*/
 private Action boldAction = new StyledEditorKit.BoldAction();
 /** Ìí¼Ó¼ÓÏ»®ÏßÕìÌýÆ÷*/
 private Action underlineAction = new StyledEditorKit.UnderlineAction();
 /** Ìí¼ÓÇãбÕìÌýÆ÷*/
 private Action italicAction = new StyledEditorKit.ItalicAction();
 
 private Action insertBreakAction = new DefaultEditorKit.InsertBreakAction();
 private HTMLEditorKit.InsertHTMLTextAction unorderedListAction = new HTMLEditorKit.InsertHTMLTextAction("Bullets", "<


Ïà¹ØÎĵµ£º

java·´Éä³£¼û·½·¨

»ñÈ¡classÀà·½·¨£º
1£¬getClass 2£¬Class.forName() 3,ÓÃ.class
public Field[] getDeclaredFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐÀàÐ͵ıäÁ¿£¬²»°üÀ¨¼Ì³Ð¸¸ÀàµÄ
public Field[] getDeclaredFields(String name)
·µ»ØÌض¨Ãû×Ö
public Field[]  getFields()
·µ»ØµÄÊÇij¸öÀàÀïµÄËùÓÐpublicÀàÐ͵ıäÁ¿£¬°üÀ¨¼Ì³Ð¸¸Àൠ......

treePanel json javaºǫ́

 function createTreeMenu(){//´´½¨Ò»¸öÊ÷µÄÃæ°å
 var treeMenu = new Ext.tree.TreePanel({
  lines : true,
  minSize : 150,
  border : false,
  root : new Ext.tree.AsyncTreeNode({text : 'root'}),
  loader : new Ext.tree.TreeLoader({dataUr ......

javaÈçºÎ´Ó¿ØÖÆ̨»ñµÃÒ»ÐÐÊäÈë

  /**
  *
  * @param par
  *            ÈëÁ¦Ãû
  * @return ÈëÁ¦値
  */
 public static String inputfromConsole(String par) {
  System.out.println(par);
  InputStreamReader ......

java±ÊÊÔ»ã×Ü£¨2£©

41¡¢ÊÇ·ñ¿ÉÒԼ̳ÐStringÀà?
StringÀàÊÇfinalÀà¹Ê²»¿ÉÒԼ̳С£
42¡¢swtichÊÇ·ñÄÜ×÷ÓÃÔÚbyteÉÏ£¬ÊÇ·ñÄÜ×÷ÓÃÔÚlongÉÏ£¬ÊÇ·ñÄÜ×÷ÓÃÔÚStringÉÏ?
switch£¨expr1£©ÖУ¬expr1ÊÇÒ»¸öÕûÊý±í´ïʽ¡£Òò´Ë´«µÝ¸ø switch ºÍ case Óï¾äµÄ²ÎÊýÓ¦¸ÃÊÇ int¡¢ short¡¢ char »òÕß byte¡£long,st ......

Java³£ÓôúÂë

    /**
     * @author he
     *
     *
     * °ÑDateת»»³ÉString£¬ÒÔyyyy-MM-dd HH:mm:ssµÄÐÎʽÏÔʾ
     */
    public static String DateToString(Date tempDate) { ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ