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

📄 jimagedialog.html

📁 JAVA DEVELOPER’S GUIDE TO ASPRISE JTWAIN Version 9 图象处理
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.asprise.util.ui</FONT>
<BR>
Class JImageDialog</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Component.html" title="class or interface in java.awt">java.awt.Component</A>
      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Container.html" title="class or interface in java.awt">java.awt.Container</A>
          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Window.html" title="class or interface in java.awt">java.awt.Window</A>
              <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Dialog.html" title="class or interface in java.awt">java.awt.Dialog</A>
                  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JDialog.html" title="class or interface in javax.swing">javax.swing.JDialog</A>
                      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>com.asprise.util.ui.JImageDialog</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/accessibility/Accessible.html" title="class or interface in javax.accessibility">Accessible</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/image/ImageObserver.html" title="class or interface in java.awt.image">ImageObserver</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/awt/MenuContainer.html" title="class or interface in java.awt">MenuContainer</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/RootPaneContainer.html" title="class or interface in javax.swing">RootPaneContainer</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/WindowConstants.html" title="class or interface in javax.swing">WindowConstants</A></DD>
</DL>
<HR>
<DL>
<DT>public final class <B>JImageDialog</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JDialog.html" title="class or interface in javax.swing">JDialog</A></DL>

<P>
A dialog allows the user to load images and to perform basic image editing tasks.<br>  This component proves to be extremely useful if you need the user to  load/browse/edit/specify images in your applications. <p><i>Advantages include: </i> <ul> <li>Multiple image sources supported: local computer, digital cameras, scanners and the web <li>Multiple image formats: read and write BMP, PNG, JPG, GIF, PCT, PSD and many other formats <li>Platform/Virtual machine independent: Any platform, any Java virtual machine (version 1.3 or above) <li>Powerful features: rotation, flipping, scaling, clipping, etc.  <li>User friendly as well as developer friendly </ul> <p> The user can <b>load images from local computer or the web</b>,  he or she can also <b>acquire images from digital cammeras and scanners</b>.  After the image has been loaded, the user can <b>rotate, clip, flip,  and scale the image</b>. The image has been loaded and edited, the user can  <b>save the image or select the image</b> - which will be used in your applications.   <p> <i>Sample uses: </i> <p> <b>1. Modal (synchronous) mode</b> <code> <pre> JImageDialog dialog = new JImageDialog(frame, "Sample", true); // Modal dialog BufferedImage image = dialog.showDialog(); ...  </pre> </code> <p> <b>2. Asynchronous mode</b> <code> <pre> public class JImageDialogSample extends JPanel implements JImageDialogListener { 	  ...   BufferedImage image;      // Displays selected image if any.    public void paintComponent(Graphics g) {       super.paintComponent(g); // Paint background.        if(image != null)           g.drawImage(image, 0, 0, null);   }    // Sets image and refreshes the panel. 	 public void setImage(BufferedImage image) {       this.image = image;       setPreferredSize(getPreferredSize());       revalidate();       repaint();   }    // Methods in JImageDialogListener   // When the user presses cancel button, this method will be called.    public void onCancel() {        setImage(null);   }

⌨️ 快捷键说明

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