Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2011 Michael Ruflin, Andr´┐Ż Locher, Claudia von Bastian. This file is part of Tatool. Tatool is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Tatool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Tatool. If not, see <http://www.gnu.org/licenses/>. /
 
 package ch.tatool.core.display.swing.status;
 
Status panel that provides a title and value property only.

Author(s):
Michael Ruflin
 
 public class TextStatusPanel extends javax.swing.JPanel implements StatusPanel {
 	
 	private static final long serialVersionUID = -4631097079694011596L;

Creates new form TextStatusPanel
 
     public TextStatusPanel() {
         initComponents();
     }
     
     // StatusPanel interface
     
     public void setEnabled(boolean enabled) {
     	super.setEnabled(enabled);
     	.setEnabled(enabled);
     	.setEnabled(enabled);
     }
    
    
Reset the panel to its default state.
 
 	public void reset() {
 	}
     
     public Object getProperty(String key) {
     	if (.equals(key)) {
     		return getTitleLabel().getText();
     	}
     	else if (.equals(key)) {
     		return .getText();
     	}
     	else {
     		return null;
     	}
 	}
 
 	public JPanel getView() {
 		return this;
 	}
 
 	public void setProperty(String keyObject value) {
 		if (.equals(key)) {
 			String text = String.valueOf(value);
     		.setText(text);
     	}
     	else if (.equals(key)) {
     		String text = String.valueOf(value);
     		.setText(text);
     	}
 	}
 
 	
 	
 	// Implementation
 
 		return ;
 	}
 
 	public void setTitleLabel(javax.swing.JLabel titleLabel) {
 		this. = titleLabel;
 	}
 
 		return ;
 	}
 
 	public void setValueLabel(javax.swing.JLabel valueLabel) {
 		this. = valueLabel;
 	}

This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
         = new javax.swing.JLabel();
         = new javax.swing.JLabel();
        setBackground(new java.awt.Color(255, 255, 235));
        setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
        setLayout(new java.awt.BorderLayout());
        .setText(" ");
        .setText(" ");
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    // End of variables declaration//GEN-END:variables
New to GrepCode? Check out our FAQ X