code
stringlengths
73
34.1k
label
stringclasses
1 value
private List<SpriteTiled> getRasters(Integer sheet) { return rasterSheets.computeIfAbsent(sheet, s -> { final List<SpriteTiled> rasters = new ArrayList<>(RasterImage.MAX_RASTERS); rasterSheets.put(s, rasters); return rasters; }); }
java
public void terminate() { try { in.close(); } catch (final IOException exception) { Verbose.exception(exception); } try { out.close(); } catch (final IOException exception) { Verbo...
java
public byte[] receiveMessages() { try { final byte[] data; final int size = in.available(); if (size <= 0) { data = null; } else { data = new byte[size]; in.readFully(d...
java
private static Integer getLayer(Featurable featurable) { if (featurable.hasFeature(Layerable.class)) { final Layerable layerable = featurable.getFeature(Layerable.class); return layerable.getLayerDisplay(); } return LAYER_DEFAULT; }
java
private void remove(Integer layer, Displayable displayable) { final Collection<Displayable> displayables = getLayer(layer); displayables.remove(displayable); if (displayables.isEmpty()) { indexs.remove(layer); } }
java
public void reset() { for (final Tile tile : revealed) { final Tile reset = new TileGame(tile.getSheet(), FOG, tile.getX(), tile.getY(), ...
java
private void actionWillProduce() { if (checker.checkProduction(current)) { startProduction(current); state = ProducerState.PRODUCING; } else { for (final ProducerListener listener : listeners) { listen...
java
private void actionProducing(double extrp) { for (final ProducerListener listener : listeners) { listener.notifyProducing(currentObject); } for (final ProducibleListener listener : current.getFeature(Producible.class).getListeners()) { listener...
java
private void actionProduced() { for (final ProducerListener listener : listeners) { listener.notifyProduced(currentObject); } for (final ProducibleListener listener : current.getFeature(Producible.class).getListeners()) { listener.notifyProduct...
java
private void startProduction(Featurable featurable) { final Transformable transformable = featurable.getFeature(Transformable.class); final Producible producible = featurable.getFeature(Producible.class); transformable.setLocation(producible.getX(), producible.getY()); handler.a...
java
public static FramesConfig imports(Configurer configurer) { Check.notNull(configurer); return imports(configurer.getRoot()); }
java
public static FramesConfig imports(Xml root) { Check.notNull(root); final Xml node = root.getChild(NODE_FRAMES); final int horizontals = node.readInteger(ATT_HORIZONTAL); final int verticals = node.readInteger(ATT_VERTICAL); final int offsetX = node.readInteger(0, ATT...
java
public static Xml exports(FramesConfig config) { Check.notNull(config); final Xml node = new Xml(NODE_FRAMES); node.writeInteger(ATT_HORIZONTAL, config.getHorizontal()); node.writeInteger(ATT_VERTICAL, config.getVertical()); node.writeInteger(ATT_OFFSET_X, config.getO...
java
public static Integer imports(Configurer configurer) { Check.notNull(configurer); if (configurer.hasNode(NODE_GROUP)) { final String group = configurer.getText(NODE_GROUP); try { return Integer.valueOf(group); } ...
java
public static void exports(Xml root, Collidable collidable) { Check.notNull(root); Check.notNull(collidable); final Xml node = root.createChild(NODE_GROUP); node.setText(collidable.getGroup().toString()); }
java
public static boolean compareTile(int tw, int th, ImageBuffer a, int xa, int ya, ImageBuffer b, int xb, int yb) { for (int x = 0; x < tw; x++) { for (int y = 0; y < th; y++) { final int colorA = a.getRgb(x + xa, y + ya); final int colorB = b.ge...
java
private static boolean isExtracted(SpriteTiled level, int x, int y, Collection<ImageBuffer> tiles) { final int tw = level.getTileWidth(); final int th = level.getTileHeight(); final ImageBuffer surface = level.getSurface(); for (final ImageBuffer tile : tiles) { ...
java
private static ImageBuffer extract(SpriteTiled level, int number) { final ColorRgba transparency = level.getSurface().getTransparentColor(); final ImageBuffer tile = Graphics.createImageBuffer(level.getTileWidth(), level.getTileHeight(), transparency); final Graphic g = tile.createGraphic();...
java
private static int getTilesNumber(int tileWidth, int tileHeight, Collection<Media> levelRips) { int tiles = 0; for (final Media levelRip : levelRips) { final ImageHeader info = ImageInfo.get(levelRip); final int horizontalTiles = info.getWidth() / tileWidth; ...
java
private int extract(Canceler canceler, SpriteTiled level, int tilesNumber, Collection<ImageBuffer> tiles, int checkedTiles) { final int horizontalTiles = level.getTilesHorizontal(); final int verticalTile...
java
private int updateProgress(int checkedTiles, int tilesNumber, int oldPercent, Collection<ImageBuffer> tiles) { final int percent = getProgressPercent(checkedTiles, tilesNumber); if (percent != oldPercent) { for (final ProgressListener listener : listeners) { ...
java
public void rotate(double angle) { final double x2 = x + width; final double y2 = y; final double x3 = x2; final double y3 = y + height; final double x4 = x; final double y4 = y3; final double cx = x + width / 2.0; final double cy = y + ...
java
public void set(double x, double y, double w, double h) { this.x = x; this.y = y; width = w; height = h; }
java
public static Raster load(Media media) { Check.notNull(media); final Xml root = new Xml(media); final RasterData dataRed = RasterData.load(root, CHANNEL_RED); final RasterData dataGreen = RasterData.load(root, CHANNEL_GREEN); final RasterData dataBlue = RasterData.loa...
java
public static Collection<PathCategory> imports(Media configPathfinding) { Check.notNull(configPathfinding); final Xml nodeCategories = new Xml(configPathfinding); final Collection<Xml> childrenTile = nodeCategories.getChildren(TILE_PATH); final Collection<PathCategory> categor...
java
private void addBorderLabels() { borderLabels = new JLabel[6][6]; // These two arrays represent the cell location of every border label. // Note that some coordinate combinations from these arrays are not used. // The array index is based on the border label index (not the cell location)...
java
private void addDateLabels() { dateLabels = new ArrayList<JLabel>(); for (int i = 0; i < 42; ++i) { int dateLabelColumnX = ((i % 7)) + constantFirstDateLabelCell.x; int dateLabelRowY = ((i / 7) + constantFirstDateLabelCell.y); JLabel dateLabel = new JLabel(); ...
java
private void addWeekNumberLabels() { weekNumberLabels = new ArrayList<JLabel>(); int weekNumberLabelColumnX = constantFirstWeekNumberLabelCell.x; int weekNumberLabelWidthInCells = 1; int weekNumberLabelHeightInCells = 1; for (int i = 0; i < 6; ++i) { int weekNumberLab...
java
private void addWeekdayLabels() { weekdayLabels = new ArrayList<JLabel>(); int weekdayLabelRowY = constantFirstWeekdayLabelCell.y; int weekdayLabelWidthInCells = 1; int weekdayLabelHeightInCells = 3; for (int i = 0; i < 7; ++i) { int weekdayLabelColumnX = (i + constan...
java
private void addTopLeftLabel() { topLeftLabel = new JLabel(); topLeftLabel.setOpaque(true); topLeftLabel.setVisible(false); centerPanel.add(topLeftLabel, CC.xywh( constantTopLeftLabelCell.x, constantTopLeftLabelCell.y, 1, 3)); }
java
private void dateLabelMousePressed(MouseEvent e) { // Get the label that was clicked. JLabel label = (JLabel) e.getSource(); // If the label is empty, do nothing and return. String labelText = label.getText(); if ("".equals(labelText)) { return; } // W...
java
private int getLastDayOfMonth(YearMonth yearMonth) { LocalDate firstDayOfMonth = LocalDate.of(yearMonth.getYear(), yearMonth.getMonth(), 1); int lastDayOfMonth = firstDayOfMonth.lengthOfMonth(); return lastDayOfMonth; }
java
private Point getMonthOrYearMenuLocation(JLabel sourceLabel, JPopupMenu filledPopupMenu) { Rectangle labelBounds = sourceLabel.getBounds(); int menuHeight = filledPopupMenu.getPreferredSize().height; int popupX = labelBounds.x + labelBounds.width + 1; int popupY = labelBounds.y + (labelB...
java
private void labelIndicatorMouseEntered(MouseEvent e) { // Skip this function if the settings have not been applied. if (settings == null) { return; } JLabel label = ((JLabel) e.getSource()); // Do not highlight the today label if today is vetoed. if (label ==...
java
private void labelIndicatorMouseExited(MouseEvent e) { JLabel label = ((JLabel) e.getSource()); labelIndicatorSetColorsToDefaultState(label); }
java
private void labelIndicatorSetColorsToDefaultState(JLabel label) { if (label == null || settings == null) { return; } if (label == labelMonth || label == labelYear) { label.setBackground(settings.getColor(DateArea.BackgroundMonthAndYearMenuLabels)); monthAndYe...
java
private void labelMonthIndicatorMousePressed(MouseEvent e) { // Skip this function if the settings have not been applied. if (settings == null) { return; } // If the month menu is disabled, then return. if (settings.getEnableMonthMenu() == false) { return;...
java
private void labelYearIndicatorMousePressed(MouseEvent e) { // If the year menu is disabled, then return. if (settings.getEnableYearMenu() == false) { return; } // Create and show the year menu. int firstYearDifference = -11; int lastYearDifference = +11; ...
java
public void setSelectedDate(LocalDate selectedDate) { setSelectedDateWithoutShowing(selectedDate); YearMonth yearMonthToShow = (selectedDate == null) ? YearMonth.now() : YearMonth.from(selectedDate); setDisplayedYearMonth(yearMonthToShow); }
java
private void setSizeOfWeekNumberLabels() { JLabel firstLabel = weekNumberLabels.get(0); Font font = firstLabel.getFont(); FontMetrics fontMetrics = firstLabel.getFontMetrics(font); int width = fontMetrics.stringWidth("53 "); width += constantWeekNumberLabelInsets.left; wi...
java
private void userSelectedADate(LocalDate selectedDate) { // Skip this function if the settings have not been applied. if (settings == null) { return; } // If a date was selected and the date is vetoed, do nothing. if (selectedDate != null) { DateVetoPolicy...
java
private void zAddMouseListenersToTodayAndClearButtons() { labelSetDateToToday.addMouseListener(new MouseLiberalAdapter() { @Override public void mouseLiberalClick(MouseEvent e) { labelSetDateToTodayMousePressed(e); } @Override public v...
java
private void zInternalChangeSelectedDateProcedure( LocalDate newDate, YearMonth oldYearMonthOrNull) { LocalDate oldDate = displayedSelectedDate; displayedSelectedDate = newDate; for (CalendarListener calendarListener : calendarListeners) { CalendarSelectionEvent dateSelection...
java
void zApplyBorderPropertiesList() { // Skip this function if the settings have not been applied. if (settings == null) { return; } // Clear the current borders. (Set them to be invisible and black.) CalendarBorderProperties clearBordersProperties = new CalendarBorderP...
java
void zApplyVisibilityOfButtons() { boolean showNextMonth = settings.getVisibleNextMonthButton(); boolean showNextYear = settings.getVisibleNextYearButton(); boolean showPreviousMonth = settings.getVisiblePreviousMonthButton(); boolean showPreviousYear = settings.getVisiblePreviousYearBut...
java
private Integer zGetWeekNumberForASevenDayRange(LocalDate firstDateInRange, WeekFields weekFieldRules, boolean requireUnanimousWeekNumber) { // Get the week number for each of the seven days in the range. ArrayList<Integer> weekNumbersList = new ArrayList<Integer>(); for (int daysIntoTh...
java
public void setSettings(DatePickerSettings datePickerSettings) { // If no settings were supplied, then create a default settings instance. if (datePickerSettings == null) { datePickerSettings = new DatePickerSettings(); } // Save the settings. this.settings = datePick...
java
private static void addLocalizedPickerAndLabel(int rowMarker, String labelText, String languageCode) { // Create the localized date picker and label. Locale locale = new Locale(languageCode); DatePickerSettings settings = new DatePickerSettings(locale); // Set a minimum size for ...
java
private static void setTimeOneWithTimeTwoButtonClicked(ActionEvent e) { LocalTime timePicker2Time = timePicker2.getTime(); timePicker1.setTime(timePicker2Time); // Display message. String message = "The timePicker1 value was set using the timePicker2 value!\n\n"; String timeStrin...
java
private static void setTwoWithY2KButtonClicked(ActionEvent e) { // Set date picker date. LocalDate dateY2K = LocalDate.of(2000, Month.JANUARY, 1); datePicker2.setDate(dateY2K); // Display message. String dateString = datePicker2.getDateStringOrSuppliedString("(null)"); St...
java
private static void setOneWithTwoButtonClicked(ActionEvent e) { // Set date from date picker 2. LocalDate datePicker2Date = datePicker2.getDate(); datePicker1.setDate(datePicker2Date); // Display message. String message = "The datePicker1 date was set using the datePicker2 date!\...
java
private static void clearOneAndTwoButtonClicked(ActionEvent e) { // Clear the date pickers. datePicker1.clear(); datePicker2.clear(); // Display message. String message = "The datePicker1 and datePicker2 dates were cleared!\n\n"; message += getDatePickerOneDateText() + "\...
java
private static void showSystemInformationButtonClicked() { String runningJavaVersion = InternalUtilities.getJavaRunningVersionAsString(); String targetJavaVersion = InternalUtilities.getJavaTargetVersionFromPom(); String projectVersion = InternalUtilities.getProjectVersionString(); boole...
java
public void setColumnSpec(int columnIndex, ColumnSpec columnSpec) { checkNotNull(columnSpec, "The column spec must not be null."); colSpecs.set(columnIndex - 1, columnSpec); }
java
public void setRowSpec(int rowIndex, RowSpec rowSpec) { checkNotNull(rowSpec, "The row spec must not be null."); rowSpecs.set(rowIndex - 1, rowSpec); }
java
private void shiftComponentsHorizontally(int columnIndex, boolean remove) { final int offset = remove ? -1 : 1; for (Object element : constraintMap.entrySet()) { Map.Entry entry = (Map.Entry) element; CellConstraints constraints = (CellConstraints) entry.getValue(); i...
java
private void shiftComponentsVertically(int rowIndex, boolean remove) { final int offset = remove ? -1 : 1; for (Object element : constraintMap.entrySet()) { Map.Entry entry = (Map.Entry) element; CellConstraints constraints = (CellConstraints) entry.getValue(); int y1...
java
private static void adjustGroupIndices(int[][] allGroupIndices, int modifiedIndex, boolean remove) { final int offset = remove ? -1 : +1; for (int[] allGroupIndice : allGroupIndices) { int[] groupIndices = allGroupIndice; for (int i = 0; i < groupIndices.length; i++) ...
java
public void setConstraints(Component component, CellConstraints constraints) { checkNotNull(component, "The component must not be null."); checkNotNull(constraints, "The constraints must not be null."); constraints.ensureValidGridBounds(getColumnCount(), getRowCount()); constraintMap.put...
java
public void addGroupedColumn(int columnIndex) { int[][] newColGroups = getColumnGroups(); // Create a group if none exists. if (newColGroups.length == 0) { newColGroups = new int[][]{{columnIndex}}; } else { int lastGroupIndex = newColGroups.length - 1; ...
java
public void addGroupedRow(int rowIndex) { int[][] newRowGroups = getRowGroups(); // Create a group if none exists. if (newRowGroups.length == 0) { newRowGroups = new int[][]{{rowIndex}}; } else { int lastGroupIndex = newRowGroups.length - 1; int[] last...
java
@Override public Dimension maximumLayoutSize(Container target) { return new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE); }
java
private static int[] computeGridOrigins(Container container, int totalSize, int offset, List formSpecs, List[] componentLists, int[][] groupIndices, Measure minMeasure, Measure prefMeasure) { /* For each spec compute the minimum and preferr...
java
private static int[] computeOrigins(int[] sizes, int offset) { int count = sizes.length; int[] origins = new int[count + 1]; origins[0] = offset; for (int i = 1; i <= count; i++) { origins[i] = origins[i - 1] + sizes[i - 1]; } return origins; }
java
private static int[] maximumSizes(Container container, List formSpecs, List[] componentLists, Measure minMeasure, Measure prefMeasure, Measure defaultMeasure) { FormSpec formSpec; int size = formSpecs.size(); int[] result = new int[size...
java
private static int[] groupedSizes(int[][] groups, int[] rawSizes) { // Return the compressed sizes if there are no groups. if (groups == null || groups.length == 0) { return rawSizes; } // Initialize the result with the given compressed sizes. int[] sizes = new int[r...
java
private static int[] distributedSizes(List formSpecs, int totalSize, int totalPrefSize, int[] inputSizes) { double totalFreeSpace = totalSize - totalPrefSize; // Do nothing if there's no free space. if (totalFreeSpace < 0) { return inputSizes; } ...
java
private static int sum(final int[] sizes) { int sum = 0; for (int i = sizes.length - 1; i >= 0; i--) { sum += sizes[i]; } return sum; }
java
private boolean takeIntoAccount(Component component, CellConstraints cc) { return component.isVisible() || cc.honorsVisibility == null && !getHonorsVisibility() || Boolean.FALSE.equals(cc.honorsVisibility); }
java
public DatePickerSettings copySettings() { DatePickerSettings result = new DatePickerSettings(); result.allowEmptyDates = this.allowEmptyDates; result.allowKeyboardEditing = this.allowKeyboardEditing; // "result.borderCalendarPopup" is left at its default value. if (this.borderPr...
java
public boolean isDateAllowed(LocalDate date) { if (date == null) { return allowEmptyDates; } return (!(InternalUtilities.isDateVetoed(vetoPolicy, date))); }
java
public void setBorderPropertiesList(ArrayList<CalendarBorderProperties> borderPropertiesList) { if (borderPropertiesList == null) { borderPropertiesList = zGetDefaultBorderPropertiesList(); } this.borderPropertiesList = borderPropertiesList; // This only needs to be applied t...
java
public void setColorBackgroundWeekNumberLabels(Color colorBackgroundWeekNumberLabels, boolean applyMatchingDefaultBorders) { this.colorBackgroundWeekNumberLabels = colorBackgroundWeekNumberLabels; if (applyMatchingDefaultBorders) { setBorderPropertiesList(null); } zDr...
java
public void setColorBackgroundWeekdayLabels(Color colorBackgroundWeekdayLabels, boolean applyMatchingDefaultBorders) { this.colorBackgroundWeekdayLabels = colorBackgroundWeekdayLabels; if (applyMatchingDefaultBorders) { setBorderPropertiesList(null); } zDrawIndependen...
java
public boolean setDateRangeLimits(LocalDate firstAllowedDate, LocalDate lastAllowedDate) { if (!hasParent()) { throw new RuntimeException("DatePickerSettings.setDateRangeLimits(), " + "A date range limit can only be set after constructing the parent " + "DatePicker or...
java
public void setFormatForDatesBeforeCommonEra(DateTimeFormatter formatForDatesBeforeCommonEra) { this.formatForDatesBeforeCommonEraStrict = formatForDatesBeforeCommonEra.withResolverStyle(ResolverStyle.STRICT); if (parentDatePicker != null) { parentDatePicker.setTextFieldToValidSt...
java
public void setFormatForDatesBeforeCommonEra(String patternString) { DateTimeFormatter formatter = PickerUtilities.createFormatterFromPatternString(patternString, getLocale()); setFormatForDatesBeforeCommonEra(formatter); }
java
public void setFormatForDatesCommonEra(DateTimeFormatter formatForDatesCommonEra) { this.formatForDatesCommonEraStrict = formatForDatesCommonEra.withResolverStyle(ResolverStyle.STRICT); if (parentDatePicker != null) { parentDatePicker.setTextFieldToValidStateIfNeeded(); }...
java
public void setFormatForDatesCommonEra(String patternString) { DateTimeFormatter formatter = PickerUtilities.createFormatterFromPatternString(patternString, getLocale()); setFormatForDatesCommonEra(formatter); }
java
public void setLocale(Locale locale) { // Check for null, which indicates that we should use the default locale. if (locale == null) { locale = Locale.getDefault(); } // Fix a problem where the Hindi locale is not recognized by language alone. if ("hi".equals(locale.g...
java
void zApplyAllowEmptyDates() { // If we don't have a parent, then there is nothing to do here. (So, we return.) if (!hasParent()) { return; } // Find out if we need to initialize a null date. LocalDate selectedDate = zGetParentSelectedDate(); if ((!allowEmptyD...
java
void zApplyGapBeforeButtonPixels() { int gapPixels = (gapBeforeButtonPixels == null) ? 3 : gapBeforeButtonPixels; ConstantSize gapSizeObject = new ConstantSize(gapPixels, ConstantSize.PIXEL); ColumnSpec columnSpec = ColumnSpec.createGap(gapSizeObject); FormLayout layout = ((FormLayout) p...
java
private ArrayList<CalendarBorderProperties> zGetDefaultBorderPropertiesList() { ArrayList<CalendarBorderProperties> results = new ArrayList<CalendarBorderProperties>(); Color defaultDateBoxBorderColor = new Color(99, 130, 191); Color defaultWeekdayEndcapsBorderColor = colorBackgroundWeekdayLabel...
java
public static void main(String[] args) { // Use the standard swing code to start this demo inside a swing thread. SwingUtilities.invokeLater(new Runnable() { @Override public void run() { // Create an instance of the demo. DurationDemo demo = new D...
java
private void initializeComponents() { // Set up the form which holds the date picker components. setTitle("LGoodDatePicker Basic Demo " + InternalUtilities.getProjectVersionString()); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setLayout(new FlowLayout()); setSize(new Dimens...
java
public String columnGet(String key) { String resolvedKey = resolveColumnKey(key); String cachedValue = columnMapCache.get(resolvedKey); if (cachedValue != null) { return cachedValue; } String value = columnMap.get(resolvedKey); if (value == null && parent != n...
java
public String rowGet(String key) { String resolvedKey = resolveRowKey(key); String cachedValue = rowMapCache.get(resolvedKey); if (cachedValue != null) { return cachedValue; } String value = rowMap.get(resolvedKey); if (value == null && parent != null) { ...
java
public static RowSpec decode(String encodedRowSpec, LayoutMap layoutMap) { checkNotBlank(encodedRowSpec, "The encoded row specification must not be null, empty or whitespace."); checkNotNull(layoutMap, "The LayoutMap must not be null."); String trimmed = encodedRo...
java
@Override public boolean isCellEditable(EventObject anEvent) { if (anEvent instanceof MouseEvent) { return ((MouseEvent) anEvent).getClickCount() >= clickCountToEdit; } return true; }
java
private void zAdjustTableRowHeightIfNeeded(JTable table) { if (!autoAdjustMinimumTableRowHeight) { return; } if ((table.getRowHeight() < minimumRowHeightInPixels)) { table.setRowHeight(minimumRowHeightInPixels); } }
java
public static String getTranslation(Locale locale, String key, String defaultText) { initializePropertiesIfNeeded(); String language = locale.getLanguage(); if (language == null || language.isEmpty()) { return defaultText; } String propertyKey = language + ".text." + ...
java
private static void initializePropertiesIfNeeded() { if (translationResources != null) { return; } String lastException = ""; try { translationResources = new Properties(); ClassLoader classLoader = ClassLoader.getSystemClassLoader(); trans...
java
public static boolean isLafAqua() { ensureValidCache(); if (cachedIsLafAqua == null) { cachedIsLafAqua = Boolean.valueOf(computeIsLafAqua()); } return cachedIsLafAqua.booleanValue(); }
java
@Override public int getBaseline(int width, int height) { if (timeTextField.isVisible()) { return timeTextField.getBaseline(width, height); } return super.getBaseline(width, height); }
java
public String getTimeStringOrSuppliedString(String emptyTimeString) { LocalTime time = getTime(); return (time == null) ? emptyTimeString : time.toString(); }
java
public boolean isTextValid(String text) { // If the text is null, return false. if (text == null) { return false; } // If the text is empty, return the value of allowEmptyTimes. text = text.trim(); if (text.isEmpty()) { return settings.getAllowEmpt...
java
public void openPopup() { // If the component is disabled, do nothing. if (!isEnabled()) { return; } // If the show popup menu button is not shown, do nothing. if (settings.getDisplayToggleTimeMenuButton() == false) { return; } // If this f...
java
@Override public void setEnabled(boolean enabled) { if (enabled == false) { closePopup(); } setTextFieldToValidStateIfNeeded(); super.setEnabled(enabled); toggleTimeMenuButton.setEnabled(enabled); timeTextField.setEnabled(enabled); zDrawTextFieldIn...
java
public void setTime(LocalTime optionalTime) { // Set the text field to the supplied time, using the standard format for null, or a time. String standardTimeString = zGetStandardTextFieldTimeString(optionalTime); String textFieldString = timeTextField.getText(); // We will only change the...
java
private void zAddKeyListenersToTextField() { timeTextField.addKeyListener(new KeyAdapter() { /** * upPressed, This indicates whether or not the up arrow has already been pressed. This * is used to make sure that we do not "react" to the up arrow multiple times when the ...
java