List of usage examples for java.awt Image SCALE_DEFAULT
int SCALE_DEFAULT
To view the source code for java.awt Image SCALE_DEFAULT.
Click Source Link
From source file:View.FormPengaturan.java
public void isiProfil() { try {// w ww. java 2 s. c o m Profil prof = PengaturanKontrol.getKoneksi().tampilProfil(); label_namaDesa.setText("BADAN USAHA MILIK DESA " + prof.getNamadesa()); label_alamatNotelp.setText(prof.getAlamatdesa() + " " + prof.getDesa() + " " + prof.getKecamatan() + " " + prof.getKabupaten() + " " + prof.getProvinsi() + " - " + prof.getNotelp()); text_namadesa.setText(prof.getNamadesa()); text_alamatdesa.setText(prof.getAlamatdesa()); text_noTelp.setText(prof.getNotelp()); text_desa.setText(prof.getDesa()); text_kecamatan.setText(prof.getKecamatan()); text_kabupaten.setText(prof.getKabupaten()); text_provinsi.setText(prof.getProvinsi()); text_email.setText(prof.getEmail()); String path = new File(".").getCanonicalPath(); Toolkit toolkit = Toolkit.getDefaultToolkit(); Image image = toolkit.getImage(path + "/Gambar/" + prof.getLogo()); // Image imagedResized = image.getScaledInstance(200, 250, Image.SCALE_DEFAULT); Image imagedResized = image.getScaledInstance(175, 145, Image.SCALE_DEFAULT); ImageIcon imageIcon = new ImageIcon(imagedResized); label_gambar.setIcon(imageIcon); label_namaFile.setText(prof.getLogo()); label_namaFile.setVisible(false); } catch (IOException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:stainingestimation.StainingEstimation.java
private void jComboBox1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboBox1ItemStateChanged if (previewOriginal != null && evt.getStateChange() == java.awt.event.ItemEvent.SELECTED) { if (((String) jComboBox1.getSelectedItem()).equalsIgnoreCase("User values")) { Colour_Deconvolution.getUserColors(this, manager.getVisibleTMAspot()); }/*w w w . j a v a 2 s . co m*/ setParam_ColorChannel((String) jComboBox1.getSelectedItem()); calculatePreviewConvolution( new ImagePlus("", previewOriginal.getScaledInstance(-1, -1, Image.SCALE_DEFAULT))); displayPreviewImages(); } }
From source file:View.FormAnggota.java
private void tabel_anggotaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tabel_anggotaMouseClicked try {//from w ww.j a v a 2 s . c om custom(); int row1 = tabel_anggota.getSelectedRow(); text_idAnggota.setText(tabel_anggota.getValueAt(row1, 0).toString()); Anggota agt = AnggotaKontrol.getKoneksi().cariIdAnggota(tabel_anggota.getValueAt(row1, 1).toString()); text_nama.setText(agt.getNamaAnggota()); text_pekerjaan.setText(agt.getPekerjaan()); text_alamat.setText(agt.getAlamat()); text_rt.setText(Integer.toString(agt.getRt())); text_rw.setText(Integer.toString(agt.getRw())); combo_dusun.setSelectedItem(agt.getDusun()); text_desa.setText(agt.getDesa()); text_kota.setText(agt.getKota()); text_provinsi.setText(agt.getProvinsi()); text_telp.setText(agt.getNoTelp()); text_ktp.setText(agt.getNoKTP()); text_kecamatan.setText(agt.getKecamatan()); Anggota foto = AnggotaKontrol.getKoneksi().selectAnggota(agt.getIdAnggota()); String path = new File(".").getCanonicalPath(); Toolkit toolkit = Toolkit.getDefaultToolkit(); Image image = toolkit.getImage(path + "/Gambar/" + foto.getLogo()); // Image imagedResized = image.getScaledInstance(200, 250, Image.SCALE_DEFAULT); Image imagedResized = image.getScaledInstance(175, 250, Image.SCALE_DEFAULT); ImageIcon imageIcon = new ImageIcon(imagedResized); label_Gambar.setIcon(imageIcon); label_namaFile.setText(foto.getLogo()); dialog_anggota.setVisible(false); text_biaya.setEditable(false); } catch (SQLException ex) { Logger.getLogger(FormAnggota.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(FormAnggota.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:stainingestimation.StainingEstimation.java
private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCheckBox1ActionPerformed if (previewOriginal != null) { calculatePreviewConvolution(//ww w .j a v a 2 s .c o m new ImagePlus("", previewOriginal.getScaledInstance(-1, -1, Image.SCALE_DEFAULT))); displayPreviewImages(); } }
From source file:View.FormAnggota.java
private void button_uploadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_button_uploadActionPerformed JFileChooser jfc = new JFileChooser(); if (jfc.showOpenDialog(label_Gambar) == JFileChooser.APPROVE_OPTION) { Toolkit toolkit = Toolkit.getDefaultToolkit(); Image image = toolkit.getImage(jfc.getSelectedFile().getAbsolutePath()); Image imagedResized = image.getScaledInstance(175, 250, Image.SCALE_DEFAULT); ImageIcon imageIcon = new ImageIcon(imagedResized); label_Gambar.setIcon(imageIcon); label_namaFile.setText(jfc.getSelectedFile().getName());//nama file nya // System.out.println("jLabelnamaFile : " + label_namaFile.getText()); file = new File(jfc.getSelectedFile().getPath()); // file untuk dikopi // System.out.println("file : " + file.getPath()); }// w w w . ja v a 2s .c o m }
From source file:View.FormAnggota.java
public void sinkronGambar() { try {/* www . java 2 s . c om*/ Profil prof = PengaturanKontrol.getKoneksi().tampilProfil(); label_namaDesa.setText("BADAN USAHA MILIK DESA " + prof.getNamadesa()); label_alamatNotelp.setText(prof.getAlamatdesa() + " " + prof.getDesa() + " " + prof.getKecamatan() + " " + prof.getKabupaten() + " " + prof.getProvinsi() + " - " + prof.getNotelp()); String path = new File(".").getCanonicalPath() + "/Gambar/" + prof.getLogo(); Toolkit toolkit = Toolkit.getDefaultToolkit(); Image image = toolkit.getImage(path); Image imagedResized = image.getScaledInstance(110, 100, Image.SCALE_DEFAULT); ImageIcon imageIcon = new ImageIcon(imagedResized); label_kop.setIcon(imageIcon); } catch (IOException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } catch (SQLException ex) { Logger.getLogger(FormPengaturan.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:stainingestimation.StainingEstimation.java
/** * Refreshes the parameters with the given TMAspot, e.g. redraw the thumbnail images. * @param ts The TMAspot which is considered (should be the currently visible TMAspot in the main window). *///from w w w.jav a2 s .c o m void updateOptionsToTMAspot(TMAspot ts) { if (ts != null && ts != current_TMAspot) { //jPanel13.removeAll(); //((DefaultTableModel)jXTable1.getModel()).setRowCount(0); jXTable1.packTable(0); jScrollPane4.setPreferredSize( new Dimension(jXTable1.getPreferredSize().width, jScrollPane4.getPreferredSize().height)); if (ts.getParam_r() > 0) { jSlider1.setValue(ts.getParam_r()); } if (ts.getParam_t_hema() > 0) { jSlider3.setValue(ts.getParam_t_hema()); } if (ts.getParam_t_dab() > 0) { jSlider2.setValue(ts.getParam_t_dab()); } double[] f = new double[] { 1.0 }; previewOriginal = ts.getThumbnailImage(150, 150, f); imageResizeFactor = f[0]; jXLabel1.setText("Original ( " + Math.round(100.0 * imageResizeFactor) / 100.0 + " x )"); ImagePlus previewOriginal_gray_tmp = new ImagePlus("", previewOriginal.getScaledInstance(-1, -1, Image.SCALE_DEFAULT)); new ImageConverter(previewOriginal_gray_tmp).convertToGray8(); previewOriginal_gray = previewOriginal_gray_tmp.getImage(); calculatePreviewConvolution( new ImagePlus("", previewOriginal.getScaledInstance(-1, -1, Image.SCALE_DEFAULT))); displayPreviewImages(); current_TMAspot = ts; } }
From source file:in.gov.uidai.auth.sampleapp.SampleClientMainFrame.java
public void drawFingerprintImage(Image image) { jLabelBiometric.setIcon(new ImageIcon(image.getScaledInstance(jLabelBiometric.getWidth(), jLabelBiometric.getHeight(), Image.SCALE_DEFAULT))); }