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 Color
BG_COLOR_1
static Color
BG_COLOR_2
static Color
TABLE_HIGHLIGHT_COLOR
static eu.medsea.mimeutil.MimeType
UNKNOWN_MIME_TYPE
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AbstractTab
addTab(AbstractTab tab, JTabbedPane tabbedPane)
static JPanel
buildButtonBar(Action... actions)
static JPanel
buildButtonBar(JComponent... components)
static JPanel
buildButtonBarFixed(Action... actions)
static JPanel
buildButtonBarFixed(JButton... buttons)
static void
buildFileList(File file, String prefix, StringBuilder fileList)
static JPanel
buildTitleBar(org.jdesktop.swingx.JXTitledSeparator title, Action... actions)
static JPanel
buildTitleBar(org.jdesktop.swingx.JXTitledSeparator title, JComponent... buttons)
static boolean
canRead(File file)
static boolean
canWrite(File file)
static List<String>
compareMaps(Map<String,String> a, Map<String,String> b)
static void
configureDialog(JDialog dlg)
static void
configureDialog(JDialog dlg, org.jdesktop.swingx.JXPanel bgPanel)
static void
configureFrame(JFrame frame, String title, org.jdesktop.swingx.JXPanel bgPanel)
static void
configureTable(org.jdesktop.swingx.JXTable table)
static void
configureWarningComponent(JComponent component)
static BufferedImage
convertToRgb(BufferedImage srcImage)
Deprecated.static BufferedImage
convertToRgb(BufferedImage srcImage, boolean flushSrcImage)
Deprecated.static BufferedImage
convertToRgb(BufferedImage srcImage, Color bgColor)
Deprecated.static BufferedImage
convertToRgb(BufferedImage srcImage, Color bgColor, boolean flushSrcImage)
Deprecated.static net.java.balloontip.styles.BalloonTipStyle
createBalloonTipStyle()
static org.jdesktop.swingx.JXTitledSeparator
createHead1Separator(String title)
static org.jdesktop.swingx.JXTitledSeparator
createHead2Separator(String title)
static org.jdesktop.swingx.JXTitledSeparator
createMenuSeparator(String title)
static org.jdesktop.swingx.JXTitledSeparator
createMenuSeparator(String title, int marginTop)
static ModificationHandler
createModificationHandler()
static DefaultTableModel
createTableModel(String[] cols, Class[] types)
static DefaultTableModel
createTableModel(String[] cols, Class[] types, boolean[] canEdit)
static ValidationHandler
createValidationHandler()
static BufferedImage
cropImageToRatio(BufferedImage image, int ratioWidth, int ratioHeight)
Deprecated.static void
executeTask(ImmoToolTask task)
static Window
getActiveWindow()
static org.jdesktop.swingx.painter.Painter
getBackgroundGradientLeftPainter(Color bg)
static org.jdesktop.swingx.painter.Painter
getBackgroundGradientTopPainter()
static org.jdesktop.swingx.painter.Painter
getBackgroundStripesPainter()
static Object
getComponentValue(JComponent c)
static String
getCountryCodeForLanguage(String languageCode)
static String
getCountryCodeFromText(String country)
static List<String>
getCountryCodes()
Liefert die ID's der verfügbaren Länderstatic double[]
getCountryCoordinates(String countryCode)
static ImageIcon
getCountryFlagIcon(String countryCode)
static ImageIcon
getCountryFlagIcon(Locale locale)
static BufferedImage
getCountryFlagImage(String countryCode)
static BufferedImage
getCountryFlagImage(Locale locale)
static String
getCountryName(String countryCode)
static List<String>
getCurrencyCodes()
static String
getCurrencySymbol(String code)
static org.apache.commons.csv.CSVFormat
getDefaultCsvFormat()
static org.apache.commons.csv.CSVFormat
getDefaultCsvFormat(String[] headline)
static Currency
getDefaultCurrency()
static org.jdesktop.swingx.painter.AbstractPainter
getDialogBackgroundPainter()
static ImageIcon
getFileIcon(String fileName, int size)
static ImageIcon
getFileIcon(javax.mail.internet.ContentType contentType, int size)
static ImageIcon
getFileIcon(javax.mail.internet.ContentType contentType, String fileName, int size)
static String
getFirstLine(String value)
static Color
getHexColor(String s)
Erzeugt ein Color-Objekt aus einem RGB-Hex-String.static String
getHtmlBody(String html)
static String
getHumanReadableByteCount(long size)
static String
getHumanReadableByteCount(long size, NumberFormat numberFormat)
static org.xnap.commons.i18n.I18n
getI18n(Class clazz)
static org.xnap.commons.i18n.I18n
getI18n(Class clazz, Locale locale)
static String
getI18nString(Class clazz, String key)
static String
getI18nString(Class clazz, String key, Locale locale)
static String
getI18nString(org.xnap.commons.i18n.I18n i18n, String key)
static eu.medsea.mimeutil.MimeType
getMimeType(File file)
static eu.medsea.mimeutil.MimeType
getMimeType(InputStream in)
static Dimension
getPreferredSize(String html, boolean width, int prefSize)
static String
getPropertiesAsXml(Properties props, boolean stripDocType)
static Boolean
getPropertyAsBoolean(String key, Boolean defaultValue, Properties props)
static Color
getPropertyAsColor(String key, Color defaultValue, Properties props)
static Date
getPropertyAsDate(String key, Date defaultValue, Properties props)
static Float
getPropertyAsFloat(String key, Float defaultValue, Properties props)
static Integer
getPropertyAsInteger(String key, Integer defaultValue, Properties props)
static Long
getPropertyAsLong(String key, Long defaultValue, Properties props)
static String
getRandomAlphaNumericString(int length)
static String
getRandomAlphaString(int length)
static String
getRandomNumericString(int length)
static ResourceBundle
getResourceBundle(Class containerClass, Locale locale)
static ImageIcon
getResourceIcon(String resourcePath, int size, String name)
static ImageIcon
getResourceIcon(String resourcePath, int size, String name, ClassLoader loader)
static BufferedImage
getResourceImage(String resourcePath, int size, String name)
static BufferedImage
getResourceImage(String resourcePath, int size, String name, ClassLoader loader)
static URL
getResourceImageURL(String resourcePath, int size, String name)
static URL
getResourceImageURL(String resourcePath, int size, String name, ClassLoader loader)
static String
getResourcePath(Class containerClass)
static String
getResourcePath(Class containerClass, Locale locale)
static String
getUrlDecodedPath(String path)
static String
getUrlDecodedPath(String path, String separator)
static String
getUrlEncodedPath(String path)
static String
getUrlEncodedPath(String path, String separator)
static boolean
hasAlpha(BufferedImage srcImage)
Deprecated.static int
hashCode(Object obj)
static boolean
isValidHostname(String hostname)
Check, if a hostname is valid.static boolean
isValidMailAddress(String mail)
Check, if a mail address is valid.static byte[]
loadFileContent(File file)
Deprecated.static void
loadFileIntoZipStream(File f, ZipOutputStream output)
static void
loadFileIntoZipStream(File f, ZipOutputStream output, String baseDir)
static void
openPDF(File pdf)
PDF-Datei in externer Anwendung öffnen.static void
openPDF(String pdfPath)
PDF-Datei in externer Anwendung öffnen.static void
openURL(String url)
URL im Web-Browser öffnen.static void
openURL(URI url)
URL im Web-Browser öffnen.static void
openURL(URL url)
URL im Web-Browser öffnen.static void
print(Printable printable)
static String
readFile(File f)
static String
readFile(File f, String charset)
static String
readFile(File f, Charset charset)
static void
setMacOsXFullScreenMode(Window window, boolean enabled)
Enabling Full Screen Mode for Java Applications Running on Mac OS X Lion.static String
showInputDialog(String msg)
Darstellung eines Dialog-Fensters mit einem Eingabefeld.static String
showInputDialog(String msg, Component c)
Darstellung eines Dialog-Fensters mit einem Eingabefeld.static String
showInputDialog(String msg, String defaultValue)
Darstellung eines Dialog-Fensters mit einem Eingabefeld.static String
showInputDialog(String msg, String defaultValue, Component c)
static void
showMessageDialog(String msg, String title, int type)
Meldungsdialog anzeigen.static void
showMessageDialog(String msg, String title, int type, Component parent)
Meldungsdialog anzeigen.static void
showMessageErrorDialog(String msg)
Dialog mit Fehlermeldung anzeigen.static void
showMessageErrorDialog(String msg, Component parent)
static void
showMessageErrorDialog(String msg, String title)
Dialog mit Fehlermeldung anzeigen.static void
showMessageErrorDialog(String msg, String title, Component c)
Dialog mit Fehlermeldung anzeigen.static void
showMessageErrorDialog(String msg, Throwable t)
static void
showMessageErrorDialog(String msg, Throwable t, Window w)
static void
showMessageErrorDialog(String msg, Collection<String> errors)
Dialog mit Fehlermeldung anzeigen.static void
showMessageErrorDialog(String msg, Collection<String> errors, Component c)
Dialog mit Fehlermeldung anzeigen.static void
showMessageErrorDialog(String msg, Map<String,Collection<String>> errors)
Dialog mit Fehlermeldung anzeigen.static void
showMessageErrorDialog(String msg, Map<String,Collection<String>> errors, Component c)
Dialog mit Fehlermeldung anzeigen.static void
showMessageInfoDialog(String msg)
Dialog mit Fehlermeldung anzeigen.static void
showMessageInfoDialog(String msg, Component c)
static void
showMessageInfoDialog(String msg, String title)
Dialog mit Fehlermeldung anzeigen.static void
showMessageInfoDialog(String msg, String title, Component c)
static void
showMessageWarningDialog(String msg)
Dialog mit Fehlermeldung anzeigen.static void
showMessageWarningDialog(String msg, Component c)
Dialog mit Fehlermeldung anzeigen.static void
showMessageWarningDialog(String msg, String title)
Dialog mit Fehlermeldung anzeigen.static void
showMessageWarningDialog(String msg, String title, Component c)
Dialog mit Fehlermeldung anzeigen.static boolean
showQuestionDialog(String msg)
Darstellung eines Dialog-Fensters mit einer Frage.static boolean
showQuestionDialog(String msg, Component c)
static boolean
showQuestionDialog(String msg, String title, Component c)
static Boolean
showQuestionWithCancelDialog(String msg)
Darstellung eines Dialog-Fensters mit einer Frage.static Boolean
showQuestionWithCancelDialog(String msg, Component c)
Darstellung eines Dialog-Fensters mit einer Frage.static String[]
splitLines(String txt)
static String
stripTags(String txt)
static org.w3c.tidy.Tidy
tidy()
static String
tidy(String input)
static String
tidy(org.w3c.tidy.Tidy tidy, String input)
static BufferedImage
toBufferedImage(Image img)
static Image
toGray(Image image)
static ImageIcon
toGray(ImageIcon icon)
static javax.mail.internet.InternetAddress
toIdnInternetAddress(javax.mail.internet.InternetAddress address)
static String
toIdnMailAddress(String address)
static URI
toIdnUrl(String url)
static URI
toIdnUrl(URI url)
static String
toPattern(String value)
Regulären Ausdruch aus einem String erzeugen.static String
toString(Object obj)
static String
toString(Object obj, String nullStr)
static String
trimLeft(String value)
static String
trimRight(String value)
static void
unzip(File zipFile, File destinationDirectory)
static String
wrapAndIndentString(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 String
writeException(Throwable ex)
static void
writeFileToStream(File file, OutputStream out)
static String
writeHexColor(Color color)
static void
writeStreamToFile(InputStream in, File file)
static void
writeURIToStream(URI uri, OutputStream out)
static void
writeURLToStream(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:
FileNotFoundException
IOException
-
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:
FileNotFoundException
IOException
-
-