/** Creates new form JPanelButtons */ public JPanelButtons(String sConfigKey, JPanelTicket panelticket) { initComponents(); // Load categories default thumbnail tnbmacro = new ThumbNailBuilder(24, 24, "com/openbravo/images/run_script.png"); this.panelticket = panelticket; props = new Properties(); events = new HashMap<String, String>(); String sConfigRes = panelticket.getResourceAsXML(sConfigKey); if (sConfigRes != null) { try { if (m_sp == null) { SAXParserFactory spf = SAXParserFactory.newInstance(); m_sp = spf.newSAXParser(); } m_sp.parse(new InputSource(new StringReader(sConfigRes)), new ConfigurationHandler()); } catch (ParserConfigurationException ePC) { logger.log(Level.WARNING, LocalRes.getIntString("exception.parserconfig"), ePC); } catch (SAXException eSAX) { logger.log(Level.WARNING, LocalRes.getIntString("exception.xmlfile"), eSAX); } catch (IOException eIO) { logger.log(Level.WARNING, LocalRes.getIntString("exception.iofile"), eIO); } } }
public void doLoad() { JFileChooser fc = new JFileChooser(m_fCurrentDirectory); fc.addChoosableFileFilter( new ExtensionsFilter( LocalRes.getIntString("label.imagefiles"), "png", "gif", "jpg", "jpeg", "bmp")); if (fc.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { try { BufferedImage img = ImageIO.read(fc.getSelectedFile()); if (img != null) { // compruebo que no exceda el tamano maximo. if (m_maxsize != null && (img.getHeight() > m_maxsize.height || img.getWidth() > m_maxsize.width)) { if (JOptionPane.showConfirmDialog( this, LocalRes.getIntString("message.resizeimage"), LocalRes.getIntString("title.editor"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) { // Redimensionamos la imagen para que se ajuste img = resizeImage(img); } } setImage(img); m_fCurrentDirectory = fc.getCurrentDirectory(); } } catch (IOException eIO) { } } }
/** @return */ public String getMessageMsg() { StringBuilder sb = new StringBuilder(); int iSignalWord = getSignalWord(); if (iSignalWord == SGN_DANGER) { sb.append(LocalRes.getIntString("sgn.danger")); } else if (iSignalWord == SGN_WARNING) { sb.append(LocalRes.getIntString("sgn.warning")); } else if (iSignalWord == SGN_CAUTION) { sb.append(LocalRes.getIntString("sgn.caution")); } else if (iSignalWord == SGN_NOTICE) { sb.append(LocalRes.getIntString("sgn.notice")); } else if (iSignalWord == SGN_IMPORTANT) { sb.append(LocalRes.getIntString("sgn.important")); } else if (iSignalWord == SGN_SUCCESS) { sb.append(LocalRes.getIntString("sgn.success")); } else { sb.append(LocalRes.getIntString("sgn.unknown")); } sb.append(m_sHazard); sb.append(m_sConsequences); sb.append(m_sAvoiding); return sb.toString(); }
public String getReturnMessage() { return ((getPayments().get(getPayments().size() - 1)) instanceof PaymentInfoMagcard) ? ((PaymentInfoMagcard) (getPayments().get(getPayments().size() - 1))).getReturnMessage() : LocalRes.getIntString("button.ok"); }
public boolean next() throws BasicException { throw new BasicException(LocalRes.getIntString("exception.nodataset")); }
public Object getCurrent() throws BasicException { throw new BasicException(LocalRes.getIntString("exception.nodataset")); }
// public int getColumnCount() throws DataException; public DataField[] getDataField() throws BasicException { throw new BasicException(LocalRes.getIntString("exception.nodataset")); }
public Object getObject(int columnIndex) throws BasicException { throw new BasicException(LocalRes.getIntString("exception.nodataset")); }
// public java.io.InputStream getBinaryStream(int columnIndex) throws DataException; public byte[] getBytes(int columnIndex) throws BasicException { throw new BasicException(LocalRes.getIntString("exception.nodataset")); }
public java.util.Date getTimestamp(int columnIndex) throws BasicException { throw new BasicException(LocalRes.getIntString("exception.nodataset")); }
public Boolean getBoolean(int columnIndex) throws BasicException { throw new BasicException(LocalRes.getIntString("exception.nodataset")); }
public Double getDouble(int columnIndex) throws BasicException { throw new BasicException(LocalRes.getIntString("exception.nodataset")); }