package javax.swing;
import java.awt.Dimension;
import java.awt.event.KeyEvent;
import java.io.InputStream;
import java.io.IOException;
import java.net.URL;
import javax.accessibility.AccessibleContext;
import javax.swing.text.EditorKit;
import javax.swing.text.JTextComponent;
import javax.swing.text.PlainEditorKit;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
public class JEditorPane extends JTextComponent
{
private static final long serialVersionUID = 3140472492599046285L;
URL page_url;
EditorKit kit;
String ctype = "text/plain";
boolean focus_root;
boolean manages_focus;
public JEditorPane()
{
}
public JEditorPane(String url)
throws IOException
{
this();
setPage(url);
}
public JEditorPane(String type, String text)
{
ctype = text;
setText(text);
}
public JEditorPane(URL url)
throws IOException
{
setPage(url);
}
protected EditorKit createDefaultEditorKit()
{ return new PlainEditorKit(); }
static EditorKit createEditorKitForContentType(String type)
{ return new PlainEditorKit(); }
void fireHyperlinkUpdate(HyperlinkEvent e)
{
}
public AccessibleContext getAccessibleContext()
{ return null; }
String getContentType()
{ return ctype; }
EditorKit getEditorKit()
{ return kit; }
static String getEditorKitClassNameForContentType(String type)
{ return "text/plain"; }
EditorKit getEditorKitForContentType(String type)
{ return kit; }
public Dimension getPreferredSize()
{
return super.getPreferredSize();
}
public boolean getScrollableTracksViewportHeight()
{ return false; }
public boolean getScrollableTracksViewportWidth()
{ return false; }
URL getPage()
{ return page_url; }
protected InputStream getStream(URL page)
{
try {
return page.openStream();
} catch (Exception e) {
System.out.println("Hhmmm, failed to open stream: " + e);
}
return null;
}
public String getText()
{ return super.getText(); }
public String getUIClassID()
{ return "EditorPaneUI"; }
public boolean isFocusCycleRoot()
{ return focus_root; }
public boolean isManagingFocus()
{ return manages_focus; }
protected String paramString()
{ return "JEditorPane"; }
protected void processComponentKeyEvent(KeyEvent e)
{
}
protected void processKeyEvent(KeyEvent e)
{
}
void read(InputStream in, Object desc)
{
}
static void registerEditorKitForContentType(String type, String classname)
{
}
static void registerEditorKitForContentType(String type, String classname, ClassLoader loader)
{
}
void replaceSelection(String content)
{
}
protected void scrollToReference(String reference)
{
}
void setContentType(String type)
{
ctype = type;
invalidate();
repaint();
}
void setEditorKit(EditorKit kit)
{
this.kit = kit;
invalidate();
repaint();
}
void setEditorKitForContentType(String type, EditorKit k)
{
ctype = type;
setEditorKit(k);
}
void setPage(String url)
throws IOException
{
}
void setPage(URL page)
throws IOException
{
}
public void setText(String t)
{
super.setText(t);
}
public void addHyperlinkListener(HyperlinkListener listener)
{
listenerList.add (HyperlinkListener.class, listener);
}
public void removeHyperlinkListener (HyperlinkListener listener)
{
listenerList.remove (HyperlinkListener.class, listener);
}
public HyperlinkListener[] getHyperlinkListeners()
{
return (HyperlinkListener[]) getListeners (HyperlinkListener.class);
}
}