The following document contains the results of PMD's CPD 3.9.
| File | Line |
|---|---|
| org\wcb\gui\forms\auth\JLoginPanel.java | 56 |
| org\wcb\gui\forms\auth\JLoginUpdatePanel.java | 55 |
init();
}
protected void init() {
authservice = new AuthenticationUtility();
JLabel bannerLabel = new JLabel(UIHelper.getIcon("org/wcb/resources/gui/login-title.png"));
//create the message and hyperlink and hide them
errorMessageLabel = new JLabel();
errorMessageLabel.setVerticalTextPosition(SwingConstants.TOP);
errorMessageLabel.setOpaque(true);
errorMessageLabel.setBackground(new Color(255, 215, 215));
errorMessageLabel.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createLineBorder(errorMessageLabel.getBackground().darker()),
BorderFactory.createEmptyBorder(5, 7, 5, 5)));
errorMessageLabel.setVisible(false);
//create the default label
messageLabel = new JLabel("Enter your user name and password");
if(isNewUser()) {
messageLabel.setText("You appear to be a new user enter your new login.");
}
messageLabel.setOpaque(true);
messageLabel.setFont(messageLabel.getFont().deriveFont(Font.BOLD));
messageLabel.setBorder(BorderFactory.createEmptyBorder(12, 12, 7, 11));
loginPanel = createLoginPanel();
loginPanel.setBorder(BorderFactory.createEmptyBorder(0, 36, 7, 11));
contentPanel = new JPanel(new VerticalLayout());
contentPanel.add(messageLabel);
contentPanel.add(loginPanel);
errorMessageLabel.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createMatteBorder(0, 36, 0, 11, contentPanel.getBackground()),
errorMessageLabel.getBorder()));
contentPanel.add(errorMessageLabel);
//create the progress panel
progressPanel = new JPanel(new GridBagLayout());
progressMessageLabel = new JLabel("Please Wait");
progressMessageLabel.setFont(progressMessageLabel.getFont().deriveFont(Font.BOLD));
JProgressBar pb = new JProgressBar();
pb.setIndeterminate(true);
progressPanel.add(progressMessageLabel, new GridBagConstraints(0, 0, 2, 1, 1.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.HORIZONTAL, new Insets(12, 12, 11, 11), 0, 0));
progressPanel.add(pb, new GridBagConstraints(0, 1, 1, 1, 1.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 24, 11, 7), 0, 0));
setLayout(new BorderLayout());
add(bannerLabel, BorderLayout.NORTH);
add(contentPanel, BorderLayout.CENTER);
if (authservice.isRememberName()) {
namePanel.setUserName(authservice.getUsername());
rememberNameCb.setSelected(true);
}
}
private JPanel createLoginPanel() {
JPanel tempLoginPanel = new JPanel();
namePanel = new JLoginUpdatePanel.SimpleNamePanel(); | |
| File | Line |
|---|---|
| org\wcb\gui\forms\auth\JLoginPanel.java | 120 |
| org\wcb\gui\forms\auth\JLoginUpdatePanel.java | 122 |
JLabel newPasswordLabel = new JLabel("New Password");
passwordLabel.setLabelFor(passwordField);
rememberNameCb = new JCheckBox("Remember Username");
tempLoginPanel.setLayout(new GridBagLayout());
GridBagConstraints gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.anchor = GridBagConstraints.LINE_START;
gridBagConstraints.insets = new Insets(0, 0, 5, 11);
tempLoginPanel.add(nameLabel, gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.gridwidth = 1;
gridBagConstraints.anchor = GridBagConstraints.LINE_START;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new Insets(0, 0, 5, 0);
tempLoginPanel.add(namePanel.getComponent(), gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = GridBagConstraints.LINE_START;
gridBagConstraints.insets = new Insets(0, 0, 5, 11);
tempLoginPanel.add(passwordLabel, gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.gridwidth = 1;
gridBagConstraints.anchor = GridBagConstraints.LINE_START;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.weightx = 1.0;
gridBagConstraints.insets = new Insets(0, 0, 5, 0);
tempLoginPanel.add(passwordField, gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.LINE_START;
gridBagConstraints.insets = new Insets(0, 0, 5, 11); | |
| File | Line |
|---|---|
| org\wcb\gui\forms\wizard\ImportAirportWizard.java | 74 |
| org\wcb\gui\forms\wizard\ImportWizard.java | 77 |
centerPanel.add(step2Panel, "step2");
centerPanel.add(completionPanel,"completion");
JPanel buttonPanel = new JPanel();
buttonPanel.add(backButton);
buttonPanel.add(nextButton);
setLayout(new BorderLayout());
add(wizardLabel, BorderLayout.WEST);
add(centerPanel, BorderLayout.CENTER);
add(buttonPanel, BorderLayout.SOUTH);
}
public void actionPerformed(ActionEvent evt) {
Object src = evt.getSource();
if (src.equals(nextButton)) {
if(nextButton.getText().equals("Finish")) {
doImport();
showNextPanel("completion");
nextButton.setEnabled(false);
backButton.setEnabled(false);
} else {
stepCounter = stepCounter + 1;
if(stepCounter >= MAX_STEPS) {
stepCounter = MAX_STEPS;
nextButton.setText("Finish");
}
showNextPanel("step" + stepCounter);
}
}
if (src.equals(backButton)) {
if(nextButton.getText().equals("Finish")) {
nextButton.setText("Next");
}
stepCounter = stepCounter - 1;
if (stepCounter < 1) {
stepCounter = 1;
}
showNextPanel("step" + stepCounter);
}
}
/**
* Common functionality to show next panel.
* @param panelName
*/
private void showNextPanel(String panelName) {
CardLayout cl = (CardLayout) centerPanel.getLayout();
cl.show(centerPanel, panelName);
}
private void doImport() {
IImportService service = (IImportService) SpringUtil.getApplicationContext().getBean(IServicesConstants.LOGBOOK_IMPORT_SERVICE);
try
{
service.processFile(new File(step1Panel.getFilePathName()), step2Panel.getForm().getValueObject()); | |
| File | Line |
|---|---|
| org\wcb\gui\forms\e6b\HeadingGroundspeedPanel.java | 142 |
| org\wcb\gui\forms\e6b\WCACoursePanel.java | 142 |
add(courseResults, gridBagConstraints);
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 7;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(new JLabel("Calculated Groundspeed="), gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 7;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(groundspeedResults, gridBagConstraints);
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 8;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(new JLabel("Wind correction angle="), gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 8;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(wcaResults, gridBagConstraints);
}
public Integer getTrueAirspeed() {
int returnValue;
try {
returnValue = Integer.parseInt(trueAirspeed.getText());
} catch (NumberFormatException nfe) {
returnValue = 0;
}
return returnValue;
}
public void setTrueAirspeed(int trueAirspeed) {
this.trueAirspeed.setText(trueAirspeed + "");
}
public Integer getWindSpeed() {
int returnValue;
try {
returnValue = Integer.parseInt(windSpeed.getText());
} catch (NumberFormatException nfe) {
returnValue = 0;
}
return returnValue;
}
public void setWindSpeed(int windSpeed) {
this.windSpeed.setText(windSpeed + "");
}
public Integer getTrueHeading() { | |
| File | Line |
|---|---|
| org\wcb\gui\forms\e6b\HeadingGroundspeedPanel.java | 87 |
| org\wcb\gui\forms\e6b\WCACoursePanel.java | 87 |
add(trueHeading, gridBagConstraints);
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(new JLabel("True Airspeed"), gridBagConstraints);
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(trueAirspeed, gridBagConstraints);
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(new JLabel("Wind Speed"), gridBagConstraints);
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 3;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(windSpeed, gridBagConstraints);
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 4;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(new JLabel("Wind Direction"), gridBagConstraints);
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 4;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(windDirection, gridBagConstraints);
//standard calculate and reset buttons
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 5;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(calculateButton, gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 5;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(clearButton, gridBagConstraints);
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 6;
gridBagConstraints.gridwidth = 2;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(new JLabel("Calculated Course="), gridBagConstraints); | |
| File | Line |
|---|---|
| org\wcb\gui\util\MathFAA8710Utility.java | 659 |
| org\wcb\gui\util\MathFAA8710Utility.java | 765 |
if(item.getSic() > 0.0 && item.getConditionNight() > 0.0) {
switch (type.getCharacteristics()) {
case 0:
airplanes = airplanes + item.getConditionNight();
break;
case 1:
rotocraft = rotocraft + item.getConditionNight();
break;
case 2:
poweredlift = poweredlift + item.getConditionNight();
break;
case 3:
glider = glider + item.getConditionNight();
break;
case 4:
lighterthanair = lighterthanair + item.getConditionNight();
break;
case 5:
simulator = simulator + item.getConditionNight();
break;
case 6:
trainingdevice = trainingdevice + item.getConditionNight();
break;
case 7:
pcatd = pcatd + item.getConditionNight();
break;
}
}
}
returnValue.setAirplanes(airplanes);
returnValue.setRotocraft(rotocraft);
returnValue.setPoweredLift(poweredlift);
returnValue.setGliders(glider);
returnValue.setLighterThanAir(lighterthanair);
returnValue.setSimulator(simulator);
returnValue.setTrainingDevice(trainingdevice);
returnValue.setPCATD(pcatd);
return returnValue;
}
public FAA8710LineItem getNightPICLandings(List<Logbook> rows) { | |
| File | Line |
|---|---|
| org\wcb\gui\dialog\AircraftEditDialog.java | 107 |
| org\wcb\gui\dialog\AircraftTypeEntryDialog.java | 112 |
cancelButton.setText(MessageResourceRegister.getInstance().getValue(MessageKey.BUTTON_CANCEL));
cancelButton.addActionListener(this);
getContentPane().setLayout(new BorderLayout());
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new GridBagLayout());
GridBagConstraints gridBagConstraints;
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = GridBagConstraints.WEST;
buttonPanel.add(cancelButton, gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = GridBagConstraints.WEST;
buttonPanel.add(saveButton, gridBagConstraints);
getContentPane().add(form, BorderLayout.CENTER);
getContentPane().add(buttonPanel, BorderLayout.SOUTH);
pack();
UIHelper.centerDialogToScreen(this);
}
/**
* Action events are if the save button is clicked save the information.
* Cancel closes the dialog box.
* @param event The component calling
*/
public void actionPerformed(ActionEvent event) {
Object source = event.getSource();
if (source.equals(saveButton))
{
this.save(); | |
| File | Line |
|---|---|
| org\wcb\gui\util\MathFAA8710Utility.java | 873 |
| org\wcb\gui\util\MathFAA8710Utility.java | 927 |
if(item.getSic() > 0.0 && item.getConditionNight() > 0.0) {
switch (type.getCharacteristics()) {
case 0:
airplanes = airplanes + item.getNightLandings();
break;
case 1:
rotocraft = rotocraft + item.getNightLandings();
break;
case 2:
poweredlift = poweredlift + item.getNightLandings();
break;
case 3:
glider = glider + item.getNightLandings();
break;
case 4:
lighterthanair = lighterthanair + item.getNightLandings();
break;
case 5:
simulator = simulator + item.getNightLandings();
break;
case 6:
trainingdevice = trainingdevice + item.getNightLandings();
break;
case 7:
pcatd = pcatd + item.getNightLandings();
break;
}
}
}
returnValue.setAirplanes(airplanes);
returnValue.setRotocraft(rotocraft);
returnValue.setPoweredLift(poweredlift);
returnValue.setGliders(glider);
returnValue.setLighterThanAir(lighterthanair);
returnValue.setSimulator(simulator);
returnValue.setTrainingDevice(trainingdevice);
returnValue.setPCATD(pcatd);
return returnValue;
} | |
| File | Line |
|---|---|
| org\wcb\gui\forms\report\TotalFlightTimeByMonthReportForm.java | 64 |
| org\wcb\gui\forms\report\TotalFlightTimeByMonthReportForm.java | 97 |
private void initComponents() {
XYDataset data = this.getData();
JFreeChart chart = ChartFactory.createTimeSeriesChart(
"Time By Month", // title
"Date", // x-axis label
"Hours Flown", // y-axis label
data, // data
true, // create legend?
true, // generate tooltips?
false // generate URLs?
);
chart.setBackgroundPaint(Color.white);
XYPlot plot = (XYPlot) chart.getPlot();
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinePaint(Color.white);
plot.setRangeGridlinePaint(Color.white);
plot.setAxisOffset(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
plot.setDomainCrosshairVisible(true);
plot.setRangeCrosshairVisible(true);
plot.setNoDataMessage(MessageResourceRegister.getInstance().getValue(MessageKey.LABEL_NODATA));
XYItemRenderer r = plot.getRenderer();
if (r instanceof XYLineAndShapeRenderer) {
XYLineAndShapeRenderer renderer = (XYLineAndShapeRenderer) r;
renderer.setBaseShapesVisible(true);
renderer.setBaseShapesFilled(true);
}
DateAxis axis = (DateAxis) plot.getDomainAxis();
axis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy"));
chartPanel = new ChartPanel(chart); | |
| File | Line |
|---|---|
| org\wcb\gui\util\MathFAA8710Utility.java | 334 |
| org\wcb\gui\util\MathFAA8710Utility.java | 442 |
if(item.getCrossCountry() > 0 && item.getDualReceived() > 0.0) {
switch (type.getCharacteristics()) {
case 0:
airplanes = airplanes + item.getCrossCountry();
break;
case 1:
rotocraft = rotocraft + item.getCrossCountry();
break;
case 2:
poweredlift = poweredlift + item.getCrossCountry();
break;
case 3:
glider = glider + item.getCrossCountry();
break;
case 4:
lighterthanair = lighterthanair + item.getCrossCountry();
break;
case 5:
simulator = simulator + item.getCrossCountry();
break;
case 6:
trainingdevice = trainingdevice + item.getCrossCountry();
break;
case 7:
pcatd = pcatd + item.getCrossCountry();
break;
}
}
}
returnValue.setAirplanes(airplanes);
returnValue.setRotocraft(rotocraft);
returnValue.setPoweredLift(poweredlift);
returnValue.setGliders(glider);
returnValue.setLighterThanAir(lighterthanair);
returnValue.setSimulator(simulator);
returnValue.setTrainingDevice(trainingdevice);
returnValue.setPCATD(pcatd);
return returnValue;
}
public FAA8710LineItem getXcountryPICTime(List<Logbook> rows) { | |
| File | Line |
|---|---|
| org\wcb\gui\util\MathFAA8710Utility.java | 226 |
| org\wcb\gui\util\MathFAA8710Utility.java | 550 |
if(item.getSic() > 0.0 && item.getCrossCountry() > 0.0) {
switch (type.getCharacteristics()) {
case 0:
airplanes = airplanes + item.getSic();
break;
case 1:
rotocraft = rotocraft + item.getSic();
break;
case 2:
poweredlift = poweredlift + item.getSic();
break;
case 3:
glider = glider + item.getSic();
break;
case 4:
lighterthanair = lighterthanair + item.getSic();
break;
case 5:
simulator = simulator + item.getSic();
break;
case 6:
trainingdevice = trainingdevice + item.getSic();
break;
case 7:
pcatd = pcatd + item.getSic();
break;
}
}
}
returnValue.setAirplanes(airplanes);
returnValue.setRotocraft(rotocraft);
returnValue.setPoweredLift(poweredlift);
returnValue.setGliders(glider);
returnValue.setLighterThanAir(lighterthanair);
returnValue.setSimulator(simulator);
returnValue.setTrainingDevice(trainingdevice);
returnValue.setPCATD(pcatd);
return returnValue;
}
public FAA8710LineItem getInstrumentTime(List<Logbook> rows) { | |
| File | Line |
|---|---|
| org\wcb\gui\util\MathFAA8710Utility.java | 172 |
| org\wcb\gui\util\MathFAA8710Utility.java | 496 |
if(item.getPic() > 0.0 && item.getCrossCountry() > 0.0) {
switch (type.getCharacteristics()) {
case 0:
airplanes = airplanes + item.getPic();
break;
case 1:
rotocraft = rotocraft + item.getPic();
break;
case 2:
poweredlift = poweredlift + item.getPic();
break;
case 3:
glider = glider + item.getPic();
break;
case 4:
lighterthanair = lighterthanair + item.getPic();
break;
case 5:
simulator = simulator + item.getPic();
break;
case 6:
trainingdevice = trainingdevice + item.getPic();
break;
case 7:
pcatd = pcatd + item.getPic();
break;
}
}
}
returnValue.setAirplanes(airplanes);
returnValue.setRotocraft(rotocraft);
returnValue.setPoweredLift(poweredlift);
returnValue.setGliders(glider);
returnValue.setLighterThanAir(lighterthanair);
returnValue.setSimulator(simulator);
returnValue.setTrainingDevice(trainingdevice);
returnValue.setPCATD(pcatd);
return returnValue;
}
public FAA8710LineItem getXcountrySICTime(List<Logbook> rows) { | |
| File | Line |
|---|---|
| org\wcb\gui\util\MathFAA8710Utility.java | 64 |
| org\wcb\gui\util\MathFAA8710Utility.java | 118 |
if(item.getSolo() > 0.0) {
switch (type.getCharacteristics()) {
case 0:
airplanes = airplanes + item.getFlightDuration();
break;
case 1:
rotocraft = rotocraft + item.getFlightDuration();
break;
case 2:
poweredlift = poweredlift + item.getFlightDuration();
break;
case 3:
glider = glider + item.getFlightDuration();
break;
case 4:
lighterthanair = lighterthanair + item.getFlightDuration();
break;
case 5:
simulator = simulator + item.getFlightDuration();
break;
case 6:
trainingdevice = trainingdevice + item.getFlightDuration();
break;
case 7:
pcatd = pcatd + item.getFlightDuration();
break;
}
}
}
returnValue.setAirplanes(airplanes);
returnValue.setRotocraft(rotocraft);
returnValue.setPoweredLift(poweredlift);
returnValue.setGliders(glider);
returnValue.setLighterThanAir(lighterthanair);
returnValue.setSimulator(simulator);
returnValue.setTrainingDevice(trainingdevice);
returnValue.setPCATD(pcatd);
return returnValue;
}
public FAA8710LineItem getPICTime(List<Logbook> rows) { | |
| File | Line |
|---|---|
| org\wcb\gui\util\MathFAA8710Utility.java | 334 |
| org\wcb\gui\util\MathFAA8710Utility.java | 388 |
if(item.getCrossCountry() > 0 && item.getSic() <= 0.0) {
switch (type.getCharacteristics()) {
case 0:
airplanes = airplanes + item.getCrossCountry();
break;
case 1:
rotocraft = rotocraft + item.getCrossCountry();
break;
case 2:
poweredlift = poweredlift + item.getCrossCountry();
break;
case 3:
glider = glider + item.getCrossCountry();
break;
case 4:
lighterthanair = lighterthanair + item.getCrossCountry();
break;
case 5:
simulator = simulator + item.getCrossCountry();
break;
case 6:
trainingdevice = trainingdevice + item.getCrossCountry();
break;
case 7:
pcatd = pcatd + item.getCrossCountry();
break;
}
}
}
returnValue.setAirplanes(airplanes);
returnValue.setRotocraft(rotocraft);
returnValue.setPoweredLift(poweredlift);
returnValue.setGliders(glider);
returnValue.setLighterThanAir(lighterthanair);
returnValue.setSimulator(simulator);
returnValue.setTrainingDevice(trainingdevice);
returnValue.setPCATD(pcatd);
return returnValue;
}
public FAA8710LineItem getXcountryInstructionTime(List<Logbook> rows) { | |
| File | Line |
|---|---|
| org\wcb\gui\renderer\DeleteButtonTableCellEditor.java | 82 |
| org\wcb\gui\renderer\EditButtonTableCellEditor.java | 73 |
columnModel.getColumn(column).setMaxWidth(25);
}
public Component getTableCellRendererComponent(
JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
{
if(value instanceof TotalLogEntriesVO)
{
blankLabel.setBackground(new Color(0x000a5a));
return blankLabel;
}
if (hasFocus)
{
renderButton.setForeground(table.getForeground());
renderButton.setBackground(UIManager.getColor("Button.background"));
}
else if (isSelected)
{
renderButton.setForeground(table.getSelectionForeground());
renderButton.setBackground(table.getSelectionBackground());
}
else
{
renderButton.setForeground(table.getForeground());
renderButton.setBackground(UIManager.getColor("Button.background"));
}
return renderButton;
}
public Component getTableCellEditorComponent(
JTable table, Object value, boolean isSelected, int row, int column)
{
if(value instanceof TotalLogEntriesVO) {
tableObject = "";
blankLabel.setBackground(new Color(0x000a5a));
return blankLabel;
}
tableObject = value; | |
| File | Line |
|---|---|
| org\wcb\gui\forms\e6b\CelsiusConversionPanel.java | 79 |
| org\wcb\gui\forms\e6b\FahrenheitConversionPanel.java | 76 |
add(new JLabel("F"), gridBagConstraints);
//standard calculate and reset buttons
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 2;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.anchor = GridBagConstraints.WEST;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.insets = new Insets(4, 0, 4, 0);
add(calculateButton, gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 2;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(clearButton, gridBagConstraints);
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 3;
gridBagConstraints.gridwidth = 3;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(new JLabel("Calculated Tempurature ="), gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 3;
gridBagConstraints.gridy = 3;
gridBagConstraints.anchor = GridBagConstraints.WEST;
add(results, gridBagConstraints);
}
public Integer getTempuratureFahrenheit() { | |
| File | Line |
|---|---|
| org\wcb\gui\forms\wizard\ExportWizard.java | 97 |
| org\wcb\gui\forms\wizard\ImportWizard.java | 96 |
doImport();
showNextPanel("completion");
nextButton.setEnabled(false);
backButton.setEnabled(false);
} else {
stepCounter = stepCounter + 1;
if(stepCounter >= MAX_STEPS) {
stepCounter = MAX_STEPS;
nextButton.setText("Finish");
}
showNextPanel("step" + stepCounter);
}
}
if (src.equals(backButton)) {
if(nextButton.getText().equals("Finish")) {
nextButton.setText("Next");
}
stepCounter = stepCounter - 1;
if (stepCounter < 1) {
stepCounter = 1;
}
showNextPanel("step" + stepCounter);
}
}
/**
* Common functionality to show next panel.
* @param panelName The name of the panel to show.
*/
private void showNextPanel(String panelName) {
CardLayout cl = (CardLayout) centerPanel.getLayout();
cl.show(centerPanel, panelName);
}
private void doImport() { | |
| File | Line |
|---|---|
| org\wcb\gui\component\border\BookBorder.java | 79 |
| org\wcb\gui\component\border\LeftPageBookBorder.java | 73 |
g.drawImage(rightImg, x + width - imgWidth, i, null);
}
//Draw top border
for (int i = 0; i < width; i += imgWidth) {
g.drawImage(topImg, i, 0, null);
}
//draw bottom border
imgHeight = bottomImg.getHeight();
imgWidth = bottomImg.getWidth();
for (int i = 0; i < width; i += imgWidth) {
g.drawImage(bottomImg, i, height - imgHeight, null);
}
//Draw top right corner
imgWidth = topRightImg.getWidth();
g.drawImage(topRightImg, x + width - imgWidth, 0, null);
//Draw bottom right corner
imgHeight = bottomRightImg.getHeight();
imgWidth = bottomRightImg.getWidth();
g.drawImage(bottomRightImg, x + width - imgWidth, height - imgHeight, null); | |
| File | Line |
|---|---|
| org\wcb\gui\dialog\AircraftEditDialog.java | 105 |
| org\wcb\gui\dialog\AirportEntryDialog.java | 92 |
saveButton = new WaveButton(MessageResourceRegister.getInstance().getValue(MessageKey.BUTTON_SAVE));
saveButton.addActionListener(this);
cancelButton = new WaveButton(MessageResourceRegister.getInstance().getValue(MessageKey.BUTTON_CANCEL));
cancelButton.addActionListener(this);
getContentPane().setLayout(new BorderLayout());
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new GridBagLayout());
GridBagConstraints gridBagConstraints;
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = GridBagConstraints.WEST;
buttonPanel.add(cancelButton, gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = GridBagConstraints.WEST;
buttonPanel.add(saveButton, gridBagConstraints); | |
| File | Line |
|---|---|
| org\wcb\gui\forms\wizard\ExportWizard.java | 75 |
| org\wcb\gui\forms\wizard\ImportWizard.java | 74 |
completionPanel.setTextToLabel("You have successfully imported data into your Log book!");
centerPanel = new JPanel(new CardLayout());
centerPanel.add(step1Panel, "step1");
centerPanel.add(step2Panel, "step2");
centerPanel.add(completionPanel,"completion");
JPanel buttonPanel = new JPanel();
buttonPanel.add(backButton);
buttonPanel.add(nextButton);
setLayout(new BorderLayout());
add(wizardLabel, BorderLayout.WEST);
add(centerPanel, BorderLayout.CENTER);
add(buttonPanel, BorderLayout.SOUTH);
}
public void actionPerformed(ActionEvent evt) {
Object src = evt.getSource();
if (src.equals(nextButton)) {
if(nextButton.getText().equals("Finish")) { | |
| File | Line |
|---|---|
| org\wcb\gui\dialog\JLoginDialog.java | 90 |
| org\wcb\gui\dialog\JLoginUpdateUserDialog.java | 77 |
cancelButton = new JButton("Cancel");
loginButton.addActionListener(this);
cancelButton.addActionListener(this);
JPanel buttonPanel = new JPanel(new GridBagLayout());
buttonPanel.add(loginButton, new GridBagConstraints(0, 0, 1, 1, 1.0, 0.0, GridBagConstraints.LINE_END, GridBagConstraints.NONE, new Insets(17, 12, 11, 5), 0, 0));
buttonPanel.add(cancelButton, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_END, GridBagConstraints.NONE, new Insets(17, 0, 11, 11), 0, 0));
return buttonPanel;
}
public JLoginUpdatePanel getPanel() { | |
| File | Line |
|---|---|
| org\wcb\gui\dialog\AircraftTypeEntryDialog.java | 112 |
| org\wcb\gui\dialog\AirportEntryDialog.java | 95 |
cancelButton = new WaveButton(MessageResourceRegister.getInstance().getValue(MessageKey.BUTTON_CANCEL));
cancelButton.addActionListener(this);
getContentPane().setLayout(new BorderLayout());
JPanel buttonPanel = new JPanel();
buttonPanel.setLayout(new GridBagLayout());
GridBagConstraints gridBagConstraints;
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = GridBagConstraints.WEST;
buttonPanel.add(cancelButton, gridBagConstraints);
gridBagConstraints = new GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 1;
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
gridBagConstraints.anchor = GridBagConstraints.WEST;
buttonPanel.add(saveButton, gridBagConstraints); | |
| File | Line |
|---|---|
| org\wcb\gui\util\MathFAA8710Utility.java | 713 |
| org\wcb\gui\util\MathFAA8710Utility.java | 874 |
switch (type.getCharacteristics()) {
case 0:
airplanes = airplanes + item.getNightLandings();
break;
case 1:
rotocraft = rotocraft + item.getNightLandings();
break;
case 2:
poweredlift = poweredlift + item.getNightLandings();
break;
case 3:
glider = glider + item.getNightLandings();
break;
case 4:
lighterthanair = lighterthanair + item.getNightLandings();
break;
case 5:
simulator = simulator + item.getNightLandings();
break;
case 6:
trainingdevice = trainingdevice + item.getNightLandings();
break;
case 7:
pcatd = pcatd + item.getNightLandings();
break;
}
} | |
| File | Line |
|---|---|
| org\wcb\gui\forms\report\TotalTimeAircraftReportForm.java | 95 |
| org\wcb\gui\forms\report\TotalTimeReportForm.java | 98 |
Double nightFlight = 0.0;
for(Logbook item : rows) {
totalTime = totalTime + item.getFlightDuration();
pic = pic + item.getPic();
sic = sic + item.getSic();
xCountry = xCountry + item.getCrossCountry();
instructing = instructing + item.getFlightInstructing();
safety = safety + item.getSafetyPilot();
dual = dual + item.getDualReceived();
solo = solo + item.getSolo();
nightFlight = nightFlight + item.getConditionNight();
actualIMC = actualIMC + item.getConditionActualImc();
simulatedIMC = simulatedIMC + item.getConditionSimulatedImc(); | |
| File | Line |
|---|---|
| org\wcb\gui\renderer\DeleteButtonTableCellEditor.java | 93 |
| org\wcb\gui\renderer\RowButtonTableCell.java | 69 |
if (hasFocus)
{
renderButton.setForeground(table.getForeground());
renderButton.setBackground(UIManager.getColor("Button.background"));
}
else if (isSelected)
{
renderButton.setForeground(table.getSelectionForeground());
renderButton.setBackground(table.getSelectionBackground());
}
else
{
renderButton.setForeground(table.getForeground());
renderButton.setBackground(UIManager.getColor("Button.background"));
}
return renderButton;
}
public Component getTableCellEditorComponent(
JTable table, Object value, boolean isSelected, int row, int column)
{
if(value instanceof TotalLogEntriesVO) { | |
| File | Line |
|---|---|
| org\wcb\gui\forms\LogbookEntryForm.java | 750 |
| org\wcb\gui\forms\LogbookEntryForm.java | 808 |
public void setEndLongitude(String longitude, SphericalDistanceCalculator calculate) {
if (StringUtils.trimToNull(longitude) != null) {
StringTokenizer tokens = new StringTokenizer(longitude, "-");
int startLonDeg = Integer.parseInt(tokens.nextToken());
double startLonMin = Double.parseDouble(tokens.nextToken());
String secondsPartial = tokens.nextToken();
String secondsToken = secondsPartial.substring(0,secondsPartial.length() - 1);
double startLonSec = Double.parseDouble(secondsToken);
String ew = secondsPartial.substring(secondsPartial.length() - 1);
calculate.setLongitudeTo(startLonDeg, startLonMin, startLonSec, this.getSphericalLocation(ew)); | |
| File | Line |
|---|---|
| org\wcb\gui\forms\LogbookEntryForm.java | 732 |
| org\wcb\gui\forms\LogbookEntryForm.java | 790 |
public void setEndLatitude(String latitude, SphericalDistanceCalculator calculate) {
if (StringUtils.trimToNull(latitude) != null) {
StringTokenizer tokens = new StringTokenizer(latitude, "-");
int startLatDeg = Integer.parseInt(tokens.nextToken());
double startLatMin = Double.parseDouble(tokens.nextToken());
String secondsPartial = tokens.nextToken();
String secondsToken = secondsPartial.substring(0, secondsPartial.length() - 1);
double startLatSec = Double.parseDouble(secondsToken);
String ns = secondsPartial.substring(secondsPartial.length()-1);
calculate.setLatitudeTo(startLatDeg, startLatMin, startLatSec, this.getSphericalLocation(ns)); | |
| File | Line |
|---|---|
| org\wcb\gui\forms\report\TotalTimeReportForm.java | 60 |
| org\wcb\gui\forms\report\TotalTimeReportForm.java | 73 |
DefaultPieDataset dataset = getData();
JFreeChart chart = ChartFactory.createPieChart3D("Total Time " + formatter.format(totalTime) + " hours", dataset, true, true, false);
PiePlot plot = (PiePlot) chart.getPlot();
plot.setSectionOutlinesVisible(false);
plot.setLabelFont(new Font("SansSerif", Font.PLAIN, 12));
plot.setNoDataMessage(MessageResourceRegister.getInstance().getValue(MessageKey.LABEL_NODATA));
plot.setCircular(false);
plot.setForegroundAlpha(.5f);
plot.setLabelGap(0.02);
chartPanel = new ChartPanel(chart); | |
| File | Line |
|---|---|
| org\wcb\gui\forms\wizard\ExportWizard.java | 78 |
| org\wcb\gui\forms\wizard\ImportAirportWizard.java | 74 |
centerPanel.add(step1Panel, "step1");
centerPanel.add(completionPanel,"completion");
JPanel buttonPanel = new JPanel();
buttonPanel.add(backButton);
buttonPanel.add(nextButton);
setLayout(new BorderLayout());
add(wizardLabel, BorderLayout.WEST);
add(centerPanel, BorderLayout.CENTER);
add(buttonPanel, BorderLayout.SOUTH);
}
/**
* Action Event to perform for this import wizard.
* @param evt Fired event.
*/
public void actionPerformed(ActionEvent evt) {
Object src = evt.getSource();
if (src.equals(nextButton)) {
if(nextButton.getText().equals("Finish")) { | |