The following document contains the results of PMD's CPD 5.3.5.
| File | Project | Line |
|---|---|---|
| net\sourceforge\jdatebutton\javafx\ArrowIcon.java | JavaFX Date Button | 33 |
| net\sourceforge\jdatebutton\swing\ArrowIcon.java | Java Swing Date Button | 35 |
public enum ArrowIcon {
/**
* Up Arrow.
*/
UP(new Point(1, 9), new Point(5, 1), new Point(9, 9)),
/**
* Down Arrow.
*/
DOWN(new Point(1, 1), new Point(5, 9), new Point(9, 1)),
/**
* Left Arrow.
*/
LEFT(new Point(1, 5), new Point(9, 1), new Point(9, 9)),
/**
* Right Arrow.
*/
RIGHT(new Point(1, 1), new Point(1, 9), new Point(9, 5)),
/**
* DoubleUp Arrow.
*/
DOUBLEUP(new Point(1, 5), new Point(5, 1), new Point(9, 5), new Point(5, 5), new Point(9, 9), new Point(1, 9), new Point(5, 5)),
/**
* DoubleDown Arrow.
*/
DOUBLEDOWN(new Point(1, 1), new Point(1, 9), new Point(5, 5), new Point(9, 5), new Point(5, 9), new Point(1, 5), new Point(5, 5)),
/**
* DoubleLeft Arrow.
*/
DOUBLELEFT(new Point(1, 5), new Point(5, 1), new Point(5, 5), new Point(9, 1), new Point(9, 9), new Point(5, 5), new Point(5, 9)),
/**
* DoubleRight Arrow.
*/
DOUBLERIGHT(new Point(1, 1), new Point(1, 9), new Point(5, 5), new Point(5, 9), new Point(9, 5), new Point(5, 1), new Point(5, 5));
/**
* locations of points.
*/
private final Double[] thePoints; | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\jdatebutton\javafx\JDateDialog.java | JavaFX Date Button | 676 |
| net\sourceforge\jdatebutton\swing\JDateDialog.java | Java Swing Date Button | 782 |
myLabel.setWeekend();
}
/* Determine whether the day is select-able */
boolean isSelectable = true;
if ((iEarliest > 0)
&& (iDay < iEarliest)) {
isSelectable = false;
} else if ((iLatest > 0)
&& (iDay > iLatest)) {
isSelectable = false;
}
/* Set text */
myLabel.setDay(iDay, isSelectable);
}
/* Loop through remaining columns in row */
for (int iDay = 1; iCol < DAYS_IN_WEEK; iCol++, iDay++) {
/* Access the label */
PanelDay myLabel = theDays[iRow][iCol];
/* Reset the day and set no day */
myLabel.resetDay(false);
myLabel.setDay(iDay, false);
}
/* Resize to the number of rows */
reSizeRows(iRow + 1);
}
/**
* build Day names.
*/
private void buildDayNames() {
/* Get todays date */
Locale myLocale = theConfig.getLocale();
Calendar myDate = Calendar.getInstance(myLocale);
int myStart = myDate.getFirstDayOfWeek();
if (myStart == Calendar.SUNDAY) {
myStart += DAYS_IN_WEEK;
}
/* Build the array of the days of the week */
DayOfWeek myDoW = DayOfWeek.of(myStart - 1);
for (int iDay = 0; iDay < DAYS_IN_WEEK; iDay++, myDoW = myDoW.plus(1)) {
/* Store the day into the array */
theDaysOfWk[iDay] = myDoW;
}
/* Loop through the labels */
for (int iCol = 0; iCol < DAYS_IN_WEEK; iCol++) { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\jdatebutton\javafx\JDateDialog.java | JavaFX Date Button | 474 |
| net\sourceforge\jdatebutton\swing\JDateDialog.java | Java Swing Date Button | 546 |
public void handle(final ActionEvent e) {
/* Access the event source */
Object src = e.getSource();
/* If the button is previous month */
if (thePrevMonthButton.equals(src)) {
/* Adjust the month */
theConfig.previousMonth();
theDialog.buildMonth();
} else if (theNextMonthButton.equals(src)) {
/* Adjust the month */
theConfig.nextMonth();
theDialog.buildMonth();
} else if (thePrevYearButton.equals(src)) {
/* Adjust the month */
theConfig.previousYear();
theDialog.buildMonth();
} else if (theNextYearButton.equals(src)) {
/* Adjust the month */
theConfig.nextYear();
theDialog.buildMonth();
}
}
}
}
/**
* Month Panel.
*/
private static final class PanelMonth
extends GridPane { | ||
| File | Project | Line |
|---|---|---|
| net\sourceforge\jdatebutton\javafx\JDateDialog.java | JavaFX Date Button | 65 |
| net\sourceforge\jdatebutton\swing\JDateDialog.java | Java Swing Date Button | 98 |
private static final String CSS_STYLE = JDateDialog.class.getResource("JDateDialog.css").toExternalForm();
/**
* Resource Bundle.
*/
private static final ResourceBundle NLS_BUNDLE = ResourceBundle.getBundle(JDateDialog.class.getName());
/**
* ToolTip for Current Day.
*/
public static final String NLS_CURRENTDAY = NLS_BUNDLE.getString("CurrentDay");
/**
* ToolTip for Selected Day.
*/
public static final String NLS_SELECTEDDAY = NLS_BUNDLE.getString("SelectedDay");
/**
* ToolTip for Next Month.
*/
public static final String NLS_NEXTMONTH = NLS_BUNDLE.getString("NextMonth");
/**
* ToolTip for Previous Month.
*/
public static final String NLS_PREVMONTH = NLS_BUNDLE.getString("PreviousMonth");
/**
* ToolTip for Next Year.
*/
public static final String NLS_NEXTYEAR = NLS_BUNDLE.getString("NextYear");
/**
* ToolTip for Previous Year.
*/
public static final String NLS_PREVYEAR = NLS_BUNDLE.getString("PreviousYear");
/**
* Null Date selection text.
*/
public static final String NLS_NULLSELECT = NLS_BUNDLE.getString("NullSelect");
/**
* The month array.
*/
private final PanelMonth theDaysPanel; | ||