📄 systraymenu.html
字号:
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#hideIcon()">hideIcon</A></B>()</CODE>
<BR>
Hides the icon, if it is currently visible.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#isAvailable()">isAvailable</A></B>()</CODE>
<BR>
Enables checking whether SysTray for Java is available on this platform.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#isIconVisible()">isIconVisible</A></B>()</CODE>
<BR>
Getter for the visibility of the icon.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE>
<BR>
Prints out a version string and exits.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#removeAll()">removeAll</A></B>()</CODE>
<BR>
Removes all menu items.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#removeItem(java.lang.Object)">removeItem</A></B>(java.lang.Object item)</CODE>
<BR>
Removes the passed item from this menu.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#removeItemAt(int)">removeItemAt</A></B>(int index)</CODE>
<BR>
Removes the item at position <code>index</code> from this menu.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#setIcon(snoozesoft.systray4j.SysTrayMenuIcon)">setIcon</A></B>(<A HREF="../../snoozesoft/systray4j/SysTrayMenuIcon.html" title="class in snoozesoft.systray4j">SysTrayMenuIcon</A> icon)</CODE>
<BR>
Sets the icon to be displayed in the system tray for this menu.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#setItems(java.util.Vector)">setItems</A></B>(java.util.Vector items)</CODE>
<BR>
Rebuilds this menu according to the passed vector.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#setToolTip(java.lang.String)">setToolTip</A></B>(java.lang.String toolTip)</CODE>
<BR>
Sets the tooltip of this menu.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../snoozesoft/systray4j/SysTrayMenu.html#showIcon()">showIcon</A></B>()</CODE>
<BR>
Shows the icon, if it is currently hidden.</TD>
</TR>
</TABLE>
<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">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="SEPARATOR"><!-- --></A><H3>
SEPARATOR</H3>
<PRE>
public static snoozesoft.systray4j.SysTrayMenu.Separator <B>SEPARATOR</B></PRE>
<DL>
<DD>The separator object.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="VERSION"><!-- --></A><H3>
VERSION</H3>
<PRE>
public static java.lang.String <B>VERSION</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="SysTrayMenu(snoozesoft.systray4j.SysTrayMenuIcon)"><!-- --></A><H3>
SysTrayMenu</H3>
<PRE>
public <B>SysTrayMenu</B>(<A HREF="../../snoozesoft/systray4j/SysTrayMenuIcon.html" title="class in snoozesoft.systray4j">SysTrayMenuIcon</A> icon)</PRE>
<DL>
<DD><p>Convenience constructor.</p> <p>Calls the 'real' constructor with empty tooltip and items arguments.</p>
<P>
<DT><B>Parameters:</B><DD><CODE>icon</CODE> - The systray icon of this menu.</DL>
<HR>
<A NAME="SysTrayMenu(snoozesoft.systray4j.SysTrayMenuIcon, java.lang.String)"><!-- --></A><H3>
SysTrayMenu</H3>
<PRE>
public <B>SysTrayMenu</B>(<A HREF="../../snoozesoft/systray4j/SysTrayMenuIcon.html" title="class in snoozesoft.systray4j">SysTrayMenuIcon</A> icon, java.lang.String toolTip)</PRE>
<DL>
<DD><p>Convenience constructor.</p> <p>Calls the 'real' constructor with empty items argument.</p>
<P>
<DT><B>Parameters:</B><DD><CODE>icon</CODE> - The systray icon of this menu.<DD><CODE>toolTip</CODE> - The tooltip displayed when the cursor is over the icon.</DL>
<HR>
<A NAME="SysTrayMenu(snoozesoft.systray4j.SysTrayMenuIcon, java.lang.String, java.util.Vector)"><!-- --></A><H3>
SysTrayMenu</H3>
<PRE>
public <B>SysTrayMenu</B>(<A HREF="../../snoozesoft/systray4j/SysTrayMenuIcon.html" title="class in snoozesoft.systray4j">SysTrayMenuIcon</A> icon, java.lang.String toolTip, java.util.Vector items)</PRE>
<DL>
<DD><p>'Real' construcor.</p> <p>Constructs a new menu consisting of the passed icon displayed in the system tray, the tooltip, and a popup menu appearing when the user right-clicks the systray icon. The menu items are taken from the passed vector, and inserted in bottom-up order.</p>
<P>
<DT><B>Parameters:</B><DD><CODE>icon</CODE> - The systray icon of this menu.<DD><CODE>toolTip</CODE> - The tooltip displayed when the cursor is over the icon.<DD><CODE>items</CODE> - The menu items.</DL>
<HR>
<A NAME="SysTrayMenu(snoozesoft.systray4j.SysTrayMenuIcon, java.util.Vector)"><!-- --></A><H3>
SysTrayMenu</H3>
<PRE>
public <B>SysTrayMenu</B>(<A HREF="../../snoozesoft/systray4j/SysTrayMenuIcon.html" title="class in snoozesoft.systray4j">SysTrayMenuIcon</A> icon, java.util.Vector items)</PRE>
<DL>
<DD><p>Convenience constructor.</p> <p>Calls the 'real' constructor with empty tooltip argument.</p>
<P>
<DT><B>Parameters:</B><DD><CODE>icon</CODE> - The systray icon of this menu.<DD><CODE>items</CODE> - The menu items.</DL>
<!-- ============ 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="addItem(snoozesoft.systray4j.SysTrayMenuItem)"><!-- --></A><H3>
addItem</H3>
<PRE>
public void <B>addItem</B>(<A HREF="../../snoozesoft/systray4j/SysTrayMenuItem.html" title="class in snoozesoft.systray4j">SysTrayMenuItem</A> item)</PRE>
<DL>
<DD>Inserts an item at the top of this menu.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>item</CODE> - The new menu item.</DL>
</DD>
</DL>
<HR>
<A NAME="addItem(snoozesoft.systray4j.SysTrayMenuItem, int)"><!-- --></A><H3>
addItem</H3>
<PRE>
public void <B>addItem</B>(<A HREF="../../snoozesoft/systray4j/SysTrayMenuItem.html" title="class in snoozesoft.systray4j">SysTrayMenuItem</A> item, int index)</PRE>
<DL>
<DD>Inserts an item to this menu.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>item</CODE> - The new menu item.<DD><CODE>index</CODE> - The position of the new menu item.</DL>
</DD>
</DL>
<HR>
<A NAME="addSeparator()"><!-- --></A><H3>
addSeparator</H3>
<PRE>
public void <B>addSeparator</B>()</PRE>
<DL>
<DD>Inserts a separator at the top of this menu.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="addSeparator(int)"><!-- --></A><H3>
addSeparator</H3>
<PRE>
public void <B>addSeparator</B>(int index)</PRE>
<DL>
<DD>Inserts a separator to this menu.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>index</CODE> - The position of the new separator item.</DL>
</DD>
</DL>
<HR>
<A NAME="dispose()"><!-- --></A><H3>
dispose</H3>
<PRE>
public static void <B>dispose</B>()</PRE>
<DL>
<DD>In some cases <code>System.exit()</code> is not the way you want to exit your application. Than you should call this function to make sure that the SysTray for Java thread terminates along with your threads.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getIcon()"><!-- --></A><H3>
getIcon</H3>
<PRE>
public <A HREF="../../snoozesoft/systray4j/SysTrayMenuIcon.html" title="class in snoozesoft.systray4j">SysTrayMenuIcon</A> <B>getIcon</B>()</PRE>
<DL>
<DD>Getter for the assigned icon.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -