public class Icon extends MarshalByRefObject implements java.lang.AutoCloseable
.NET documentation at https://learn.microsoft.com/dotnet/api/System.Drawing.Icon
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Drawing.Common, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
|
static java.lang.String |
assemblyShortName
Assembly name: System.Drawing.Common
|
static java.lang.String |
className
Qualified class name: System.Drawing.Icon
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
Icon() |
Icon(Icon original,
int width,
int height)
Initializes a new instance by invoking the .NET constructor.
|
Icon(Icon original,
Size size)
Initializes a new instance by invoking the .NET constructor.
|
Icon(NetType type,
java.lang.String resource)
Initializes a new instance by invoking the .NET constructor.
|
Icon(java.lang.Object instance)
Internal constructor.
|
Icon(Stream stream)
Initializes a new instance by invoking the .NET constructor.
|
Icon(Stream stream,
int width,
int height)
Initializes a new instance by invoking the .NET constructor.
|
Icon(Stream stream,
Size size)
Initializes a new instance by invoking the .NET constructor.
|
Icon(java.lang.String fileName)
Initializes a new instance by invoking the .NET constructor.
|
Icon(java.lang.String fileName,
int width,
int height)
Initializes a new instance by invoking the .NET constructor.
|
Icon(java.lang.String fileName,
Size size)
Initializes a new instance by invoking the .NET constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static Icon |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into Icon, a cast assert is made to check if types are compatible. |
NetObject |
Clone()
Invokes the .NET member Clone.
|
void |
close() |
void |
Dispose()
Invokes the .NET member Dispose.
|
static Icon |
ExtractAssociatedIcon(java.lang.String filePath)
Invokes the .NET member ExtractAssociatedIcon.
|
static Icon |
ExtractIcon(java.lang.String filePath,
int id,
boolean smallIcon)
Invokes the .NET member ExtractIcon.
|
static Icon |
ExtractIcon(java.lang.String filePath,
int id,
int size)
Invokes the .NET member ExtractIcon.
|
int |
getHeight()
Gets the value of the .NET property Height.
|
java.lang.String |
getJCOAssemblyName()
Returns the full name of the assembly of the .NET type.
|
java.lang.String |
getJCOClassName()
Returns the full name of the .NET type.
|
java.lang.Object |
getJCOInstance()
Returns the underlying object managed by the bridge.
|
java.lang.String |
getJCOObjectName()
Returns the name of the .NET type qualified with its assembly.
|
JCType |
getJCOType()
Returns the
JCType of the .NET type. |
Size |
getSize()
Gets the value of the .NET property Size.
|
int |
getWidth()
Gets the value of the .NET property Width.
|
void |
Save(Stream outputStream)
Invokes the .NET member Save.
|
void |
setJCOInstance(JCObject instance)
Sets the underlying object managed by the bridge.
|
Bitmap |
ToBitmap()
Invokes the .NET member ToBitmap.
|
GetLifetimeService, InitializeLifetimeServicepublic static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public Icon()
throws java.lang.Throwable
java.lang.Throwablepublic Icon(Icon original, int width, int height) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, FormatException, OverflowException, Win32Exception
original - the argument of type Iconwidth - the argument of type intheight - the argument of type intjava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itOverflowException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic Icon(Icon original, Size size) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, OverflowException, Win32Exception, ArrayTypeMismatchException
original - the argument of type Iconsize - the argument of type Sizejava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itOverflowException - if the .NET member raises itWin32Exception - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itpublic Icon(NetType type, java.lang.String resource) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, FormatException, OverflowException, Win32Exception
type - the argument of type NetTyperesource - the argument of type java.lang.Stringjava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itOverflowException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic Icon(java.lang.Object instance)
throws java.lang.Throwable
instance - the underlying bridge object: it must be a JCObjectjava.lang.Throwable - if instance is not a JCObjectpublic Icon(Stream stream) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, ArrayTypeMismatchException, PlatformNotSupportedException, IOException, IndexOutOfRangeException, FormatException, OverflowException, Win32Exception
stream - the argument of type Streamjava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIOException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itOverflowException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic Icon(Stream stream, int width, int height) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IOException, IndexOutOfRangeException, FormatException, OverflowException, Win32Exception
stream - the argument of type Streamwidth - the argument of type intheight - the argument of type intjava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itIOException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itOverflowException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic Icon(Stream stream, Size size) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, ArrayTypeMismatchException, PlatformNotSupportedException, IOException, IndexOutOfRangeException, FormatException, OverflowException, Win32Exception
stream - the argument of type Streamsize - the argument of type Sizejava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIOException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itOverflowException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic Icon(java.lang.String fileName)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
SerializationException,
CultureNotFoundException,
ObjectDisposedException,
InvalidOperationException,
IndexOutOfRangeException,
OverflowException,
FormatException,
Win32Exception
fileName - the argument of type java.lang.Stringjava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itSerializationException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itOverflowException - if the .NET member raises itFormatException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic Icon(java.lang.String fileName,
int width,
int height)
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
OutOfMemoryException,
SerializationException,
CultureNotFoundException,
NotSupportedException,
InvalidOperationException,
ObjectDisposedException,
OverflowException,
FormatException,
Win32Exception,
ArrayTypeMismatchException
fileName - the argument of type java.lang.Stringwidth - the argument of type intheight - the argument of type intjava.lang.Throwable - if the .NET constructor failsArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itSerializationException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itOverflowException - if the .NET member raises itFormatException - if the .NET member raises itWin32Exception - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itpublic Icon(java.lang.String fileName,
Size size)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
SerializationException,
CultureNotFoundException,
ObjectDisposedException,
InvalidOperationException,
IndexOutOfRangeException,
OverflowException,
FormatException,
Win32Exception
fileName - the argument of type java.lang.Stringsize - the argument of type Sizejava.lang.Throwable - if the .NET constructor failsArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itSerializationException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itOverflowException - if the .NET member raises itFormatException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic static Icon cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into Icon, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedIcon instancejava.lang.Throwable - in case of error during cast operationpublic NetObject Clone() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, OverflowException, Win32Exception, ArrayTypeMismatchException
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itOverflowException - if the .NET member raises itWin32Exception - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itpublic void close()
throws java.lang.Exception
close in interface java.lang.AutoCloseablejava.lang.Exceptionpublic void Dispose()
throws java.lang.Throwable,
ArgumentException,
NotSupportedException,
InvalidOperationException,
ArgumentOutOfRangeException,
ArgumentNullException
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itpublic static Icon ExtractAssociatedIcon(java.lang.String filePath) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IndexOutOfRangeException, PlatformNotSupportedException, CultureNotFoundException, MissingMethodException, TargetInvocationException, FileNotFoundException, FormatException
filePath - the argument of type java.lang.Stringjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itMissingMethodException - if the .NET member raises itTargetInvocationException - if the .NET member raises itFileNotFoundException - if the .NET member raises itFormatException - if the .NET member raises itpublic static Icon ExtractIcon(java.lang.String filePath, int id, boolean smallIcon) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IOException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException
filePath - the argument of type java.lang.Stringid - the argument of type intsmallIcon - the argument of type booleanjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itIOException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itpublic static Icon ExtractIcon(java.lang.String filePath, int id, int size) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, IOException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException
filePath - the argument of type java.lang.Stringid - the argument of type intsize - the argument of type intjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itIOException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itpublic int getHeight()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic java.lang.String getJCOAssemblyName()
NetObjectgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class MarshalByRefObjectpublic java.lang.String getJCOClassName()
NetObjectgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class MarshalByRefObjectpublic java.lang.Object getJCOInstance()
NetObjectgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class MarshalByRefObjectnull if there is nonepublic java.lang.String getJCOObjectName()
NetObjectgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class MarshalByRefObjectpublic JCType getJCOType()
NetObjectJCType of the .NET type.getJCOType in interface IJCOBridgeReflectedgetJCOType in class MarshalByRefObjectpublic Size getSize() throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic int getWidth()
throws java.lang.Throwable
java.lang.Throwable - if the call fails in the bridge or in the CLRpublic void Save(Stream outputStream) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
outputStream - the argument of type Streamjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itRankException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itArgumentNullException - if the .NET member raises itpublic void setJCOInstance(JCObject instance)
NetObjectsetJCOInstance in class MarshalByRefObjectinstance - the new underlying objectpublic Bitmap ToBitmap() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArgumentNullException, PlatformNotSupportedException, ObjectDisposedException, FormatException, ArrayTypeMismatchException, OverflowException, OutOfMemoryException
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itNotSupportedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itArgumentNullException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itFormatException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itOverflowException - if the .NET member raises itOutOfMemoryException - if the .NET member raises it