Package com.openindex.openestate.tool
Class ImmoToolUtils
- java.lang.Object
-
- com.openindex.openestate.tool.ImmoToolUtils
-
public class ImmoToolUtils extends Object
Hilfsfunktionen.- Author:
- Andreas Rudolph
-
-
Field Summary
Fields Modifier and Type Field Description static ColorBG_COLOR_1static ColorBG_COLOR_2static ColorTABLE_HIGHLIGHT_COLORstatic eu.medsea.mimeutil.MimeTypeUNKNOWN_MIME_TYPE
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AbstractTabaddTab(AbstractTab tab, JTabbedPane tabbedPane)static JPanelbuildButtonBar(Action... actions)static JPanelbuildButtonBar(JComponent... components)static JPanelbuildButtonBarFixed(Action... actions)static JPanelbuildButtonBarFixed(JButton... buttons)static voidbuildFileList(File file, String prefix, StringBuilder fileList)static JPanelbuildTitleBar(org.jdesktop.swingx.JXTitledSeparator title, Action... actions)static JPanelbuildTitleBar(org.jdesktop.swingx.JXTitledSeparator title, JComponent... buttons)static booleancanRead(File file)static booleancanWrite(File file)static List<String>compareMaps(Map<String,String> a, Map<String,String> b)static voidconfigureDialog(JDialog dlg)static voidconfigureDialog(JDialog dlg, org.jdesktop.swingx.JXPanel bgPanel)static voidconfigureFrame(JFrame frame, String title, org.jdesktop.swingx.JXPanel bgPanel)static voidconfigureTable(org.jdesktop.swingx.JXTable table)static voidconfigureWarningComponent(JComponent component)static BufferedImageconvertToRgb(BufferedImage srcImage)Deprecated.static BufferedImageconvertToRgb(BufferedImage srcImage, boolean flushSrcImage)Deprecated.static BufferedImageconvertToRgb(BufferedImage srcImage, Color bgColor)Deprecated.static BufferedImageconvertToRgb(BufferedImage srcImage, Color bgColor, boolean flushSrcImage)Deprecated.static net.java.balloontip.styles.BalloonTipStylecreateBalloonTipStyle()static org.jdesktop.swingx.JXTitledSeparatorcreateHead1Separator(String title)static org.jdesktop.swingx.JXTitledSeparatorcreateHead2Separator(String title)static org.jdesktop.swingx.JXTitledSeparatorcreateMenuSeparator(String title)static org.jdesktop.swingx.JXTitledSeparatorcreateMenuSeparator(String title, int marginTop)static ModificationHandlercreateModificationHandler()static DefaultTableModelcreateTableModel(String[] cols, Class[] types)static DefaultTableModelcreateTableModel(String[] cols, Class[] types, boolean[] canEdit)static ValidationHandlercreateValidationHandler()static BufferedImagecropImageToRatio(BufferedImage image, int ratioWidth, int ratioHeight)Deprecated.static voidexecuteTask(ImmoToolTask task)static WindowgetActiveWindow()static org.jdesktop.swingx.painter.PaintergetBackgroundGradientLeftPainter(Color bg)static org.jdesktop.swingx.painter.PaintergetBackgroundGradientTopPainter()static org.jdesktop.swingx.painter.PaintergetBackgroundStripesPainter()static ObjectgetComponentValue(JComponent c)static StringgetCountryCodeForLanguage(String languageCode)static StringgetCountryCodeFromText(String country)static List<String>getCountryCodes()Liefert die ID's der verfügbaren Länderstatic double[]getCountryCoordinates(String countryCode)static ImageIcongetCountryFlagIcon(String countryCode)static ImageIcongetCountryFlagIcon(Locale locale)static BufferedImagegetCountryFlagImage(String countryCode)static BufferedImagegetCountryFlagImage(Locale locale)static StringgetCountryName(String countryCode)static List<String>getCurrencyCodes()static StringgetCurrencySymbol(String code)static org.apache.commons.csv.CSVFormatgetDefaultCsvFormat()static org.apache.commons.csv.CSVFormatgetDefaultCsvFormat(String[] headline)static CurrencygetDefaultCurrency()static org.jdesktop.swingx.painter.AbstractPaintergetDialogBackgroundPainter()static ImageIcongetFileIcon(String fileName, int size)static ImageIcongetFileIcon(javax.mail.internet.ContentType contentType, int size)static ImageIcongetFileIcon(javax.mail.internet.ContentType contentType, String fileName, int size)static StringgetFirstLine(String value)static ColorgetHexColor(String s)Erzeugt ein Color-Objekt aus einem RGB-Hex-String.static StringgetHtmlBody(String html)static StringgetHumanReadableByteCount(long size)static StringgetHumanReadableByteCount(long size, NumberFormat numberFormat)static org.xnap.commons.i18n.I18ngetI18n(Class clazz)static org.xnap.commons.i18n.I18ngetI18n(Class clazz, Locale locale)static StringgetI18nString(Class clazz, String key)static StringgetI18nString(Class clazz, String key, Locale locale)static StringgetI18nString(org.xnap.commons.i18n.I18n i18n, String key)static eu.medsea.mimeutil.MimeTypegetMimeType(File file)static eu.medsea.mimeutil.MimeTypegetMimeType(InputStream in)static DimensiongetPreferredSize(String html, boolean width, int prefSize)static StringgetPropertiesAsXml(Properties props, boolean stripDocType)static BooleangetPropertyAsBoolean(String key, Boolean defaultValue, Properties props)static ColorgetPropertyAsColor(String key, Color defaultValue, Properties props)static DategetPropertyAsDate(String key, Date defaultValue, Properties props)static FloatgetPropertyAsFloat(String key, Float defaultValue, Properties props)static IntegergetPropertyAsInteger(String key, Integer defaultValue, Properties props)static LonggetPropertyAsLong(String key, Long defaultValue, Properties props)static StringgetRandomAlphaNumericString(int length)static StringgetRandomAlphaString(int length)static StringgetRandomNumericString(int length)static ResourceBundlegetResourceBundle(Class containerClass, Locale locale)static ImageIcongetResourceIcon(String resourcePath, int size, String name)static ImageIcongetResourceIcon(String resourcePath, int size, String name, ClassLoader loader)static BufferedImagegetResourceImage(String resourcePath, int size, String name)static BufferedImagegetResourceImage(String resourcePath, int size, String name, ClassLoader loader)static URLgetResourceImageURL(String resourcePath, int size, String name)static URLgetResourceImageURL(String resourcePath, int size, String name, ClassLoader loader)static StringgetResourcePath(Class containerClass)static StringgetResourcePath(Class containerClass, Locale locale)static StringgetUrlDecodedPath(String path)static StringgetUrlDecodedPath(String path, String separator)static StringgetUrlEncodedPath(String path)static StringgetUrlEncodedPath(String path, String separator)static booleanhasAlpha(BufferedImage srcImage)Deprecated.static inthashCode(Object obj)static booleanisValidHostname(String hostname)Check, if a hostname is valid.static booleanisValidMailAddress(String mail)Check, if a mail address is valid.static byte[]loadFileContent(File file)Deprecated.static voidloadFileIntoZipStream(File f, ZipOutputStream output)static voidloadFileIntoZipStream(File f, ZipOutputStream output, String baseDir)static voidopenPDF(File pdf)PDF-Datei in externer Anwendung öffnen.static voidopenPDF(String pdfPath)PDF-Datei in externer Anwendung öffnen.static voidopenURL(String url)URL im Web-Browser öffnen.static voidopenURL(URI url)URL im Web-Browser öffnen.static voidopenURL(URL url)URL im Web-Browser öffnen.static voidprint(Printable printable)static StringreadFile(File f)static StringreadFile(File f, String charset)static StringreadFile(File f, Charset charset)static voidsetMacOsXFullScreenMode(Window window, boolean enabled)Enabling Full Screen Mode for Java Applications Running on Mac OS X Lion.static StringshowInputDialog(String msg)Darstellung eines Dialog-Fensters mit einem Eingabefeld.static StringshowInputDialog(String msg, Component c)Darstellung eines Dialog-Fensters mit einem Eingabefeld.static StringshowInputDialog(String msg, String defaultValue)Darstellung eines Dialog-Fensters mit einem Eingabefeld.static StringshowInputDialog(String msg, String defaultValue, Component c)static voidshowMessageDialog(String msg, String title, int type)Meldungsdialog anzeigen.static voidshowMessageDialog(String msg, String title, int type, Component parent)Meldungsdialog anzeigen.static voidshowMessageErrorDialog(String msg)Dialog mit Fehlermeldung anzeigen.static voidshowMessageErrorDialog(String msg, Component parent)static voidshowMessageErrorDialog(String msg, String title)Dialog mit Fehlermeldung anzeigen.static voidshowMessageErrorDialog(String msg, String title, Component c)Dialog mit Fehlermeldung anzeigen.static voidshowMessageErrorDialog(String msg, Throwable t)static voidshowMessageErrorDialog(String msg, Throwable t, Window w)static voidshowMessageErrorDialog(String msg, Collection<String> errors)Dialog mit Fehlermeldung anzeigen.static voidshowMessageErrorDialog(String msg, Collection<String> errors, Component c)Dialog mit Fehlermeldung anzeigen.static voidshowMessageErrorDialog(String msg, Map<String,Collection<String>> errors)Dialog mit Fehlermeldung anzeigen.static voidshowMessageErrorDialog(String msg, Map<String,Collection<String>> errors, Component c)Dialog mit Fehlermeldung anzeigen.static voidshowMessageInfoDialog(String msg)Dialog mit Fehlermeldung anzeigen.static voidshowMessageInfoDialog(String msg, Component c)static voidshowMessageInfoDialog(String msg, String title)Dialog mit Fehlermeldung anzeigen.static voidshowMessageInfoDialog(String msg, String title, Component c)static voidshowMessageWarningDialog(String msg)Dialog mit Fehlermeldung anzeigen.static voidshowMessageWarningDialog(String msg, Component c)Dialog mit Fehlermeldung anzeigen.static voidshowMessageWarningDialog(String msg, String title)Dialog mit Fehlermeldung anzeigen.static voidshowMessageWarningDialog(String msg, String title, Component c)Dialog mit Fehlermeldung anzeigen.static booleanshowQuestionDialog(String msg)Darstellung eines Dialog-Fensters mit einer Frage.static booleanshowQuestionDialog(String msg, Component c)static booleanshowQuestionDialog(String msg, String title, Component c)static BooleanshowQuestionWithCancelDialog(String msg)Darstellung eines Dialog-Fensters mit einer Frage.static BooleanshowQuestionWithCancelDialog(String msg, Component c)Darstellung eines Dialog-Fensters mit einer Frage.static String[]splitLines(String txt)static StringstripTags(String txt)static org.w3c.tidy.Tidytidy()static Stringtidy(String input)static Stringtidy(org.w3c.tidy.Tidy tidy, String input)static BufferedImagetoBufferedImage(Image img)static ImagetoGray(Image image)static ImageIcontoGray(ImageIcon icon)static javax.mail.internet.InternetAddresstoIdnInternetAddress(javax.mail.internet.InternetAddress address)static StringtoIdnMailAddress(String address)static URItoIdnUrl(String url)static URItoIdnUrl(URI url)static StringtoPattern(String value)Regulären Ausdruch aus einem String erzeugen.static StringtoString(Object obj)static StringtoString(Object obj, String nullStr)static StringtrimLeft(String value)static StringtrimRight(String value)static voidunzip(File zipFile, File destinationDirectory)static StringwrapAndIndentString(String original, String indent, int width)Indent and wrap multi-line strings.static List<String>wrapStringToArray(String original, int width, BreakIterator breakIterator, boolean removeNewLines)Wrap multi-line strings (and get the individual lines).static StringwriteException(Throwable ex)static voidwriteFileToStream(File file, OutputStream out)static StringwriteHexColor(Color color)static voidwriteStreamToFile(InputStream in, File file)static voidwriteURIToStream(URI uri, OutputStream out)static voidwriteURLToStream(URL url, OutputStream out)
-
-
-
Method Detail
-
addTab
public static AbstractTab addTab(AbstractTab tab, JTabbedPane tabbedPane)
-
buildButtonBar
public static JPanel buildButtonBar(JComponent... components)
-
buildFileList
public static void buildFileList(File file, String prefix, StringBuilder fileList)
-
buildTitleBar
public static JPanel buildTitleBar(org.jdesktop.swingx.JXTitledSeparator title, Action... actions)
-
buildTitleBar
public static JPanel buildTitleBar(org.jdesktop.swingx.JXTitledSeparator title, JComponent... buttons)
-
canRead
public static boolean canRead(File file)
-
canWrite
public static boolean canWrite(File file)
-
configureDialog
public static void configureDialog(JDialog dlg)
-
configureDialog
public static void configureDialog(JDialog dlg, org.jdesktop.swingx.JXPanel bgPanel)
-
configureFrame
public static void configureFrame(JFrame frame, String title, org.jdesktop.swingx.JXPanel bgPanel)
-
configureTable
public static void configureTable(org.jdesktop.swingx.JXTable table)
-
configureWarningComponent
public static void configureWarningComponent(JComponent component)
-
convertToRgb
@Deprecated public static BufferedImage convertToRgb(BufferedImage srcImage)
Deprecated.
-
convertToRgb
@Deprecated public static BufferedImage convertToRgb(BufferedImage srcImage, Color bgColor)
Deprecated.
-
convertToRgb
@Deprecated public static BufferedImage convertToRgb(BufferedImage srcImage, boolean flushSrcImage)
Deprecated.
-
convertToRgb
@Deprecated public static BufferedImage convertToRgb(BufferedImage srcImage, Color bgColor, boolean flushSrcImage)
Deprecated.
-
createBalloonTipStyle
public static net.java.balloontip.styles.BalloonTipStyle createBalloonTipStyle()
-
createHead1Separator
public static org.jdesktop.swingx.JXTitledSeparator createHead1Separator(String title)
-
createHead2Separator
public static org.jdesktop.swingx.JXTitledSeparator createHead2Separator(String title)
-
createMenuSeparator
public static org.jdesktop.swingx.JXTitledSeparator createMenuSeparator(String title)
-
createMenuSeparator
public static org.jdesktop.swingx.JXTitledSeparator createMenuSeparator(String title, int marginTop)
-
createModificationHandler
public static ModificationHandler createModificationHandler()
-
createTableModel
public static DefaultTableModel createTableModel(String[] cols, Class[] types)
-
createTableModel
public static DefaultTableModel createTableModel(String[] cols, Class[] types, boolean[] canEdit)
-
createValidationHandler
public static ValidationHandler createValidationHandler()
-
cropImageToRatio
@Deprecated public static BufferedImage cropImageToRatio(BufferedImage image, int ratioWidth, int ratioHeight)
Deprecated.
-
executeTask
public static void executeTask(ImmoToolTask task)
-
getActiveWindow
public static Window getActiveWindow()
-
getBackgroundStripesPainter
public static org.jdesktop.swingx.painter.Painter getBackgroundStripesPainter()
-
getBackgroundGradientLeftPainter
public static org.jdesktop.swingx.painter.Painter getBackgroundGradientLeftPainter(Color bg)
-
getBackgroundGradientTopPainter
public static org.jdesktop.swingx.painter.Painter getBackgroundGradientTopPainter()
-
getComponentValue
public static Object getComponentValue(JComponent c)
-
getCountryCodes
public static List<String> getCountryCodes()
Liefert die ID's der verfügbaren Länder- Returns:
- ISO-Codes
-
getCountryFlagImage
public static BufferedImage getCountryFlagImage(Locale locale)
-
getCountryFlagImage
public static BufferedImage getCountryFlagImage(String countryCode)
-
getCountryCoordinates
public static double[] getCountryCoordinates(String countryCode)
-
getDialogBackgroundPainter
public static org.jdesktop.swingx.painter.AbstractPainter getDialogBackgroundPainter()
-
getDefaultCsvFormat
public static org.apache.commons.csv.CSVFormat getDefaultCsvFormat()
-
getDefaultCsvFormat
public static org.apache.commons.csv.CSVFormat getDefaultCsvFormat(String[] headline)
-
getDefaultCurrency
public static Currency getDefaultCurrency()
-
getFileIcon
public static ImageIcon getFileIcon(javax.mail.internet.ContentType contentType, int size)
-
getFileIcon
public static ImageIcon getFileIcon(javax.mail.internet.ContentType contentType, String fileName, int size)
-
getHexColor
public static Color getHexColor(String s)
Erzeugt ein Color-Objekt aus einem RGB-Hex-String.- Parameters:
s- RGB-Hex-String- Returns:
- Color-Objekt
-
getHumanReadableByteCount
public static String getHumanReadableByteCount(long size)
-
getHumanReadableByteCount
public static String getHumanReadableByteCount(long size, NumberFormat numberFormat)
-
getI18n
public static org.xnap.commons.i18n.I18n getI18n(Class clazz)
-
getMimeType
public static eu.medsea.mimeutil.MimeType getMimeType(File file)
-
getMimeType
public static eu.medsea.mimeutil.MimeType getMimeType(InputStream in)
-
getPreferredSize
public static Dimension getPreferredSize(String html, boolean width, int prefSize)
-
getPropertiesAsXml
public static String getPropertiesAsXml(Properties props, boolean stripDocType) throws IOException
- Throws:
IOException
-
getPropertyAsBoolean
public static Boolean getPropertyAsBoolean(String key, Boolean defaultValue, Properties props)
-
getPropertyAsColor
public static Color getPropertyAsColor(String key, Color defaultValue, Properties props)
-
getPropertyAsDate
public static Date getPropertyAsDate(String key, Date defaultValue, Properties props)
-
getPropertyAsFloat
public static Float getPropertyAsFloat(String key, Float defaultValue, Properties props)
-
getPropertyAsInteger
public static Integer getPropertyAsInteger(String key, Integer defaultValue, Properties props)
-
getPropertyAsLong
public static Long getPropertyAsLong(String key, Long defaultValue, Properties props)
-
getRandomAlphaString
public static String getRandomAlphaString(int length)
-
getRandomAlphaNumericString
public static String getRandomAlphaNumericString(int length)
-
getRandomNumericString
public static String getRandomNumericString(int length)
-
getResourceBundle
public static ResourceBundle getResourceBundle(Class containerClass, Locale locale)
-
getResourceIcon
public static ImageIcon getResourceIcon(String resourcePath, int size, String name)
-
getResourceIcon
public static ImageIcon getResourceIcon(String resourcePath, int size, String name, ClassLoader loader)
-
getResourceImage
public static BufferedImage getResourceImage(String resourcePath, int size, String name)
-
getResourceImage
public static BufferedImage getResourceImage(String resourcePath, int size, String name, ClassLoader loader)
-
getResourceImageURL
public static URL getResourceImageURL(String resourcePath, int size, String name)
-
getResourceImageURL
public static URL getResourceImageURL(String resourcePath, int size, String name, ClassLoader loader)
-
hasAlpha
@Deprecated public static boolean hasAlpha(BufferedImage srcImage)
Deprecated.
-
hashCode
public static int hashCode(Object obj)
-
isValidHostname
public static boolean isValidHostname(String hostname)
Check, if a hostname is valid.- Parameters:
hostname- The hostname to check.- Returns:
- Returns true, if the hostname is valid.
-
isValidMailAddress
public static boolean isValidMailAddress(String mail)
Check, if a mail address is valid.- Parameters:
mail- The mail address to check.- Returns:
- Returns true, if the mail address is valid.
-
loadFileContent
@Deprecated public static byte[] loadFileContent(File file) throws IOException
Deprecated.- Throws:
IOException
-
loadFileIntoZipStream
public static void loadFileIntoZipStream(File f, ZipOutputStream output) throws IOException
- Throws:
IOException
-
loadFileIntoZipStream
public static void loadFileIntoZipStream(File f, ZipOutputStream output, String baseDir) throws IOException
- Throws:
IOException
-
openPDF
public static void openPDF(String pdfPath)
PDF-Datei in externer Anwendung öffnen.- Parameters:
pdfPath- zu öffnende PDF
-
openPDF
public static void openPDF(File pdf)
PDF-Datei in externer Anwendung öffnen.- Parameters:
pdf- zu öffnende PDF
-
openURL
public static void openURL(String url)
URL im Web-Browser öffnen.- Parameters:
url- zu öffnende URL
-
openURL
public static void openURL(URL url)
URL im Web-Browser öffnen.- Parameters:
url- zu öffnende URL
-
openURL
public static void openURL(URI url)
URL im Web-Browser öffnen.- Parameters:
url- zu öffnende URL
-
print
public static void print(Printable printable) throws PrinterException
- Throws:
PrinterException
-
readFile
public static String readFile(File f) throws IOException
- Throws:
IOException
-
readFile
public static String readFile(File f, String charset) throws IOException
- Throws:
IOException
-
readFile
public static String readFile(File f, Charset charset) throws IOException
- Throws:
IOException
-
setMacOsXFullScreenMode
public static void setMacOsXFullScreenMode(Window window, boolean enabled)
Enabling Full Screen Mode for Java Applications Running on Mac OS X Lion.- Parameters:
window- the applications root windowenabled- true to enable full screen mode; false to disable- See Also:
- Enabling Full Screen Mode for Java Applications Running on Mac OS X Lion
-
showInputDialog
public static String showInputDialog(String msg)
Darstellung eines Dialog-Fensters mit einem Eingabefeld.- Parameters:
msg- dargestellter Text- Returns:
- eingegebener Text, oder null bei einem Abbruch
-
showInputDialog
public static String showInputDialog(String msg, Component c)
Darstellung eines Dialog-Fensters mit einem Eingabefeld.- Parameters:
msg- dargestellter Textc- Komponente- Returns:
- eingegebener Text, oder null bei einem Abbruch
-
showInputDialog
public static String showInputDialog(String msg, String defaultValue)
Darstellung eines Dialog-Fensters mit einem Eingabefeld.- Parameters:
msg- dargestellter TextdefaultValue- Standard-Wert im Eingabefeld- Returns:
- eingegebener Text, oder null bei einem Abbruch
-
showMessageDialog
public static void showMessageDialog(String msg, String title, int type)
Meldungsdialog anzeigen.- Parameters:
title- Mitteilungstitelmsg- Mitteilungstexttype- Mitteilungsart
-
showMessageDialog
public static void showMessageDialog(String msg, String title, int type, Component parent)
Meldungsdialog anzeigen.- Parameters:
title- Mitteilungstitelmsg- Mitteilungstexttype- Mitteilungsartparent- Parent-Komponente
-
showMessageErrorDialog
public static void showMessageErrorDialog(String msg)
Dialog mit Fehlermeldung anzeigen.- Parameters:
msg- Mitteilungstext
-
showMessageErrorDialog
public static void showMessageErrorDialog(String msg, Throwable t, Window w)
-
showMessageErrorDialog
public static void showMessageErrorDialog(String msg, Collection<String> errors)
Dialog mit Fehlermeldung anzeigen.- Parameters:
msg- Mitteilungstexterrors- Fehler-Liste
-
showMessageErrorDialog
public static void showMessageErrorDialog(String msg, Collection<String> errors, Component c)
Dialog mit Fehlermeldung anzeigen.- Parameters:
msg- Mitteilungstexterrors- Fehler-Listec- Komponente
-
showMessageErrorDialog
public static void showMessageErrorDialog(String msg, Map<String,Collection<String>> errors)
Dialog mit Fehlermeldung anzeigen.- Parameters:
msg- Mitteilungstexterrors- Fehler-Liste
-
showMessageErrorDialog
public static void showMessageErrorDialog(String msg, Map<String,Collection<String>> errors, Component c)
Dialog mit Fehlermeldung anzeigen.- Parameters:
msg- Mitteilungstexterrors- Fehler-Listec- Komponente
-
showMessageErrorDialog
public static void showMessageErrorDialog(String msg, String title)
Dialog mit Fehlermeldung anzeigen.- Parameters:
title- Mitteilungstitelmsg- Mitteilungstext
-
showMessageErrorDialog
public static void showMessageErrorDialog(String msg, String title, Component c)
Dialog mit Fehlermeldung anzeigen.- Parameters:
title- Mitteilungstitelmsg- Mitteilungstextc- Komponente
-
showMessageInfoDialog
public static void showMessageInfoDialog(String msg)
Dialog mit Fehlermeldung anzeigen.- Parameters:
msg- Mitteilungstext
-
showMessageInfoDialog
public static void showMessageInfoDialog(String msg, String title)
Dialog mit Fehlermeldung anzeigen.- Parameters:
title- Mitteilungstitelmsg- Mitteilungstext
-
showMessageInfoDialog
public static void showMessageInfoDialog(String msg, String title, Component c)
-
showMessageWarningDialog
public static void showMessageWarningDialog(String msg)
Dialog mit Fehlermeldung anzeigen.- Parameters:
msg- Mitteilungstext
-
showMessageWarningDialog
public static void showMessageWarningDialog(String msg, Component c)
Dialog mit Fehlermeldung anzeigen.- Parameters:
msg- Mitteilungstextc- Komponente
-
showMessageWarningDialog
public static void showMessageWarningDialog(String msg, String title)
Dialog mit Fehlermeldung anzeigen.- Parameters:
title- Mitteilungstitelmsg- Mitteilungstext
-
showMessageWarningDialog
public static void showMessageWarningDialog(String msg, String title, Component c)
Dialog mit Fehlermeldung anzeigen.- Parameters:
title- Mitteilungstitelmsg- Mitteilungstextc- Komponente
-
showQuestionDialog
public static boolean showQuestionDialog(String msg)
Darstellung eines Dialog-Fensters mit einer Frage.- Parameters:
msg- Text der Frage- Returns:
- true, wenn die Frage mit ja beantwortet wurde
-
showQuestionWithCancelDialog
public static Boolean showQuestionWithCancelDialog(String msg)
Darstellung eines Dialog-Fensters mit einer Frage.- Parameters:
msg- Text der Frage- Returns:
- true, wenn die Frage mit ja beantwortet wurde
-
showQuestionWithCancelDialog
public static Boolean showQuestionWithCancelDialog(String msg, Component c)
Darstellung eines Dialog-Fensters mit einer Frage.- Parameters:
msg- Text der Fragec- aufrufende Komponente- Returns:
- true, wenn die Frage mit ja beantwortet wurde
-
tidy
public static org.w3c.tidy.Tidy tidy()
-
toBufferedImage
public static BufferedImage toBufferedImage(Image img)
-
toIdnInternetAddress
public static javax.mail.internet.InternetAddress toIdnInternetAddress(javax.mail.internet.InternetAddress address)
-
toPattern
public static String toPattern(String value)
Regulären Ausdruch aus einem String erzeugen. Jedes enthaltene * wird dabei durch ein .* im regulären Ausdruck ersetzt. Jedes enthaltene ? wird dabei durch ein . im regulären Ausdruck ersetzt. Alle anderen Zeichen werden escapet.- Parameters:
value- Der umzuwandelnde Text- Returns:
- Text zur Verwendung als regulärer Ausdruck
-
unzip
public static void unzip(File zipFile, File destinationDirectory) throws IOException
- Throws:
IOException
-
wrapAndIndentString
public static String wrapAndIndentString(String original, String indent, int width)
Indent and wrap multi-line strings.- Parameters:
original- the original string to wrapindent- indentationwidth- the maximum width of lines- Returns:
- the whole string with embedded newlines
-
wrapStringToArray
public static List<String> wrapStringToArray(String original, int width, BreakIterator breakIterator, boolean removeNewLines)
Wrap multi-line strings (and get the individual lines).- Parameters:
original- the original string to wrapwidth- the maximum width of linesbreakIterator- breaks original to chars, words, sentences, depending on what instance you provide.removeNewLines- iftrue, any newlines in the original string are ignored- Returns:
- the lines after wrapping
-
writeFileToStream
public static void writeFileToStream(File file, OutputStream out) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
writeURIToStream
public static void writeURIToStream(URI uri, OutputStream out) throws IOException
- Throws:
IOException
-
writeURLToStream
public static void writeURLToStream(URL url, OutputStream out) throws IOException
- Throws:
IOException
-
writeStreamToFile
public static void writeStreamToFile(InputStream in, File file) throws FileNotFoundException, IOException
- Throws:
FileNotFoundExceptionIOException
-
-