blob: 07066f5e09c562ce0cdfe21149a7494f950c38b4 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2) on Thu May 05 14:46:26 EDT 2005 -->
<TITLE>
ContentViewer
</TITLE>
<META NAME="keywords" CONTENT="org.eclipse.wst.internet.monitor.ui.ContentViewer class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../apistyles.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="ContentViewer";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ContentViewer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ContentViewer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<A NAME="main"></A>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.eclipse.wst.internet.monitor.ui</FONT>
<BR>
Class ContentViewer</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by"><B>org.eclipse.wst.internet.monitor.ui.ContentViewer</B>
</PRE>
<HR>
<DL>
<DT>public abstract class <B>ContentViewer</B><DT>extends java.lang.Object</DL>
<P>
Editable viewer for displaying and editing requests and responses.
<p>
This abstract class is intended to be subclassed only by clients
to extend the <code>contentViewers</code> extension point.
The subclass must have a public 0-argument constructor, which will be used
automatically to instantiate the viewer when required.
Once instantiated, <A HREF="../../../../../../org/eclipse/wst/internet/monitor/ui/ContentViewer.html#init(Composite)"><CODE>init(Composite)</CODE></A> is called to create
the viewer's controls. Then <A HREF="../../../../../../org/eclipse/wst/internet/monitor/ui/ContentViewer.html#setContent(byte[])"><CODE>setContent(byte[])</CODE></A> is called,
one or more times, to cause the viewer to display particular
content. Finally, when the viewer is no longer needed, <A HREF="../../../../../../org/eclipse/wst/internet/monitor/ui/ContentViewer.html#dispose()"><CODE>dispose()</CODE></A>
is called to free up any resources tied up by the viewer.
</p>
<p>
[issue: It's unclear how these content viewers are used.
Is it just that the UI provides a list of available
views for the user to make a manual selection from, regardless
of the actual content of the message traffic?]
</p>
[issue: CS - If a ContentViewer is editable, does that mean we can edit the
bytes of the message and resend it across the wire? How is an editable ContentViewer
handled differently by the framework? Perhaps an example of what an editeable viewer would do. ]
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>1.0</DD>
</DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/internet/monitor/ui/ContentViewer.html#dispose()">dispose</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Disposes this viewer and any underlying resources such as a composite.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;byte[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/internet/monitor/ui/ContentViewer.html#getContent()">getContent</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the content from the viewer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/internet/monitor/ui/ContentViewer.html#getEditable()">getEditable</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the current viewer is editable, that is, the user is able to
edit the content.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/internet/monitor/ui/ContentViewer.html#init(Composite)">init</A></B>(Composite&nbsp;parent)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates the controls for this viewer as children of the given composite.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>abstract &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/internet/monitor/ui/ContentViewer.html#setContent(byte[])">setContent</A></B>(byte[]&nbsp;b)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the content that the viewer should display.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/eclipse/wst/internet/monitor/ui/ContentViewer.html#setEditable(boolean)">setEditable</A></B>(boolean&nbsp;editable)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set whether the current viewer is editable, that is, the user is able to
edit the content.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="init(Composite)"><!-- --></A><H3>
init</H3>
<PRE>
public abstract void <B>init</B>(Composite&nbsp;parent)</PRE>
<DL>
<DD>Creates the controls for this viewer as children of the given composite.
<p>
The default implementation of this method does nothing.
Subclasses should override this method.
</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>parent</CODE> - the parent composite</DL>
</DD>
</DL>
<HR>
<A NAME="setContent(byte[])"><!-- --></A><H3>
setContent</H3>
<PRE>
public abstract void <B>setContent</B>(byte[]&nbsp;b)</PRE>
<DL>
<DD>Sets the content that the viewer should display.
The parameter may be null if no content should be displayed.
<p>
The default implementation of this method does nothing.
Subclasses should override this method.
</p>
<p>
[issue: Since this is for displaying request-reponse messages,
why not pass an Request? The problem as it stands now is that
it is unclear from specs how content viewers relate to anything
else having to do with the monitor.]
</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>b</CODE> - the content to display, or <code>null</code> to
display nothing</DL>
</DD>
</DL>
<HR>
<A NAME="getContent()"><!-- --></A><H3>
getContent</H3>
<PRE>
public abstract byte[] <B>getContent</B>()</PRE>
<DL>
<DD>Get the content from the viewer. This is usually only interesting if the
content has changed.
<p>
The default implementation of this method does nothing and
returns null. Subclasses should override this method.
</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD>the content from the viewer, or <code>null</code> if none</DL>
</DD>
</DL>
<HR>
<A NAME="dispose()"><!-- --></A><H3>
dispose</H3>
<PRE>
public void <B>dispose</B>()</PRE>
<DL>
<DD>Disposes this viewer and any underlying resources such as a composite.
This method will be called whenever the user switches to use another
viewer or the monitor view is closed. The parent composite should not
be disposed since it may be used to display another viewer.
<p>
The default implementation of this method does nothing.
Subclasses should override this method to provide specialized cleanup.
</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setEditable(boolean)"><!-- --></A><H3>
setEditable</H3>
<PRE>
public void <B>setEditable</B>(boolean&nbsp;editable)</PRE>
<DL>
<DD>Set whether the current viewer is editable, that is, the user is able to
edit the content.
<p>
The default implementation of this method does nothing.
Subclasses should override this method to allows instances
to be made editable.
</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>editable</CODE> - <code>true</code> if true the content can be edited,
and <code>false</code> otherwise</DL>
</DD>
</DL>
<HR>
<A NAME="getEditable()"><!-- --></A><H3>
getEditable</H3>
<PRE>
public boolean <B>getEditable</B>()</PRE>
<DL>
<DD>Returns whether the current viewer is editable, that is, the user is able to
edit the content.
<p>
The default implementation of this method does nothing.
Subclasses should override this method to allows instances
to be made editable.
</p>
<P>
<DD><DL>
<DT><B>Returns:</B><DD><code>true</code> if true the content can be edited,
and <code>false</code> otherwise</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<A HREF="#main"><FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ContentViewer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../serialized-form.html"><FONT CLASS="NavBarFont1"><B>Serialized</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ContentViewer.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>