/** * Returns a color descriptor for the given RGB values * @since 3.1 * * @param toCreate RGB values to create * @return a new ColorDescriptor */ public static ColorDescriptor createFrom(RGB toCreate) { return new RGBColorDescriptor(toCreate); }
/** * Returns a color descriptor for the given RGB values * @since 3.1 * * @param toCreate RGB values to create * @return a new ColorDescriptor */ public static ColorDescriptor createFrom(RGB toCreate) { return new RGBColorDescriptor(toCreate); }
/** * Returns a color descriptor for the given RGB values * @since 1.0 * * @param toCreate RGB values to create * @return a new ColorDescriptor */ public static ColorDescriptor createFrom(RGB toCreate) { return new RGBColorDescriptor(toCreate); }
/** * Creates a ColorDescriptor from an existing color. * * The returned ColorDescriptor depends on the original Color. Disposing * the original colour while the color descriptor is still in use may cause * SWT to throw a graphic disposed exception. * * @since 3.1 * * @param toCreate Color to generate a ColorDescriptor from * @return a newly created ColorDescriptor */ public static ColorDescriptor createFrom(Color toCreate) { return new RGBColorDescriptor(toCreate); }
/** * Creates a ColorDescriptor from an existing color. * * The returned ColorDescriptor depends on the original Color. Disposing * the original colour while the color descriptor is still in use may cause * SWT to throw a graphic disposed exception. * * @since 3.1 * * @param toCreate Color to generate a ColorDescriptor from * @return a newly created ColorDescriptor */ public static ColorDescriptor createFrom(Color toCreate) { return new RGBColorDescriptor(toCreate); }
/** * Creates a ColorDescriptor from an existing color. * * The returned ColorDescriptor depends on the original Color. Disposing * the original colour while the color descriptor is still in use may cause * SWT to throw a graphic disposed exception. * * @since 1.0 * * @param toCreate Color to generate a ColorDescriptor from * @return a newly created ColorDescriptor */ public static ColorDescriptor createFrom(Color toCreate) { return new RGBColorDescriptor(toCreate); }
/** * Creates a ColorDescriptor from an existing Color, given the Device associated * with the original Color. This is the usual way to convert a Color into * a ColorDescriptor. Note that the returned ColorDescriptor depends on the * original Color, and disposing the Color will invalidate the ColorDescriptor. * * @deprecated use {@link ColorDescriptor#createFrom(Color)} * * @since 1.0 * * @param toCreate Color to convert into a ColorDescriptor. * @param originalDevice this must be the same Device that was passed into the * original Color's constructor. * @return a newly created ColorDescriptor that describes the given Color. */ public static ColorDescriptor createFrom(Color toCreate, Device originalDevice) { return new RGBColorDescriptor(toCreate); }
/** * Creates a ColorDescriptor from an existing Color, given the Device associated * with the original Color. This is the usual way to convert a Color into * a ColorDescriptor. Note that the returned ColorDescriptor depends on the * original Color, and disposing the Color will invalidate the ColorDescriptor. * * @deprecated use {@link ColorDescriptor#createFrom(Color)} * * @since 3.1 * * @param toCreate Color to convert into a ColorDescriptor. * @param originalDevice this must be the same Device that was passed into the * original Color's constructor. * @return a newly created ColorDescriptor that describes the given Color. */ @Deprecated public static ColorDescriptor createFrom(Color toCreate, Device originalDevice) { return new RGBColorDescriptor(toCreate); }
/** * Creates a ColorDescriptor from an existing Color, given the Device associated * with the original Color. This is the usual way to convert a Color into * a ColorDescriptor. Note that the returned ColorDescriptor depends on the * original Color, and disposing the Color will invalidate the ColorDescriptor. * * @deprecated use {@link ColorDescriptor#createFrom(Color)} * * @since 3.1 * * @param toCreate Color to convert into a ColorDescriptor. * @param originalDevice this must be the same Device that was passed into the * original Color's constructor. * @return a newly created ColorDescriptor that describes the given Color. */ @Deprecated public static ColorDescriptor createFrom(Color toCreate, Device originalDevice) { return new RGBColorDescriptor(toCreate); }
/** * Undoes everything that was done by a call to {@link #createColor(RGB)}. * * @since 1.0 * * @param descriptor RGB value of the color to dispose */ public final void destroyColor(RGB descriptor) { destroyColor(new RGBColorDescriptor(descriptor)); }
/** * Undoes everything that was done by a call to {@link #createColor(RGB)}. * * @since 3.1 * * @param descriptor RGB value of the color to dispose */ public final void destroyColor(RGB descriptor) { destroyColor(new RGBColorDescriptor(descriptor)); }
/** * Undoes everything that was done by a call to {@link #createColor(RGB)}. * * @since 3.1 * * @param descriptor RGB value of the color to dispose */ public final void destroyColor(RGB descriptor) { destroyColor(new RGBColorDescriptor(descriptor)); }
/** * Allocates a color, given its RGB value. Any color allocated in this * manner must be disposed by calling {@link #destroyColor(RGB)}, * or by an eventual call to {@link #dispose()}. {@link Color#dispose()} must * never been called directly on the returned color. * * @since 1.0 * * @param descriptor descriptor for the color to create * @return the Color described by the given ColorDescriptor (not null) * @throws DeviceResourceException if unable to create the color */ public final Color createColor(RGB descriptor) { return createColor(new RGBColorDescriptor(descriptor)); }
/** * Allocates a color, given its RGB value. Any color allocated in this * manner must be disposed by calling {@link #destroyColor(RGB)}, * or by an eventual call to {@link #dispose()}. {@link Color#dispose()} must * never been called directly on the returned color. * * @since 3.1 * * @param descriptor descriptor for the color to create * @return the Color described by the given ColorDescriptor (not null) * @throws DeviceResourceException if unable to create the color */ public final Color createColor(RGB descriptor) { return createColor(new RGBColorDescriptor(descriptor)); }
/** * Allocates a color, given its RGB value. Any color allocated in this * manner must be disposed by calling {@link #destroyColor(RGB)}, * or by an eventual call to {@link #dispose()}. {@link Color#dispose()} must * never been called directly on the returned color. * * @since 3.1 * * @param descriptor descriptor for the color to create * @return the Color described by the given ColorDescriptor (not null) * @throws DeviceResourceException if unable to create the color */ public final Color createColor(RGB descriptor) { return createColor(new RGBColorDescriptor(descriptor)); }