// ds update GUI with new image private void _displayInitialImage(final CPattern p_cPattern) throws CZEPMySQLManagerException { // ds update active datapoint m_cCurrentPattern = p_cPattern; // ds if we got a gif we take the image as is if (p_cPattern.isAnimated()) { // ds set the icon m_cLabelImage.setIcon(m_cMySQLManager.getImageIcon(p_cPattern)); } else { // ds set the image to the GUI field (resized) m_cLabelImage.setIcon( new ImageIcon( CImageHandler.getResizedImage( m_cMySQLManager.getBufferedImage(p_cPattern), m_iWindowWidth - 25, m_iWindowHeight - 125))); } // ds update image info m_cTextFieldTitle.setText(p_cPattern.getTitle()); // m_cTextFieldURL.setText( p_cPattern.getURL( ).toString( ) ); // m_cTextFieldTags.setText( p_cPattern.getTags( ).toString( ) ); // ds datapoint properties // m_cTextFieldImageID.setText( Integer.toString( p_cPattern.getID( ) ) ); // m_cTextFieldType.setText( p_cPattern.getType( ) ); // m_cTextFieldLikes.setText( Integer.toString( p_cPattern.getLikes( ) ) ); // m_cTextFieldDislikes.setText( Integer.toString( p_cPattern.getDislikes( ) ) ); /*ds check if gif if( p_cPattern.isAnimated( ) ) { //ds no detection done m_cTextFieldTextPercent.setText( "" ); m_cTextFieldIsPhoto.setText( "" ); } else { //ds get the values m_cTextFieldTextPercent.setText( Boolean.toString( p_cPattern.isAnimated( ) ) ); m_cTextFieldIsPhoto.setText( Boolean.toString( p_cPattern.isPhoto( ) ) ); }*/ // m_cTextFieldComments.setText( Integer.toString( p_cPattern.getCountComments( ) ) ); // m_cTextFieldTagsCount.setText( Integer.toString( p_cPattern.getCountTags( ) ) ); // ds learner // m_cTextFieldVisits.setText( Integer.toString( m_cLearner.getNumberOfVisits( ) ) ); // m_cTextFieldDatasetSize.setText( Integer.toString( m_cLearner.getOperations( ) ) ); // m_cTextFieldTotalLikes.setText( Integer.toString( m_cLearner.getNumberOfLikes( ) ) ); }
// ds update GUI with new image private void _displayImage(final CPattern p_cPattern) throws CZEPMySQLManagerException { // ds update active datapoint m_cCurrentPattern = p_cPattern; // ds if we got a gif we take the image as is if (p_cPattern.isAnimated()) { // ds set the icon m_cLabelImage.setIcon(m_cMySQLManager.getImageIcon(p_cPattern)); } else { // ds set the image to the GUI field (resized) m_cLabelImage.setIcon( new ImageIcon( CImageHandler.getResizedImage( m_cMySQLManager.getBufferedImage(p_cPattern), m_cPanelCImage.getWidth() - 5, m_cPanelCImage.getHeight() - 5))); } // ds update image info m_cTextFieldTitle.setText(p_cPattern.getTitle()); }