Creates a JFrame with a JCalendarDemo inside and can be used for testing.

@param s
The command line arguments
353408
public static void main(String[] s) {
		WindowListener l = new WindowAdapter() {
			public void windowClosing(WindowEvent e) {
				System.exit(0);
			}
		};

		JFrame frame = new JFrame("JCalendar Demo");
		frame.addWindowListener(l);

		JCalendarDemo demo = new JCalendarDemo();
		demo.init();
		frame.getContentPane().add(demo);
		frame.pack();
		frame.setBounds(200, 200, (int) frame.getPreferredSize().getWidth() + 20, (int) frame
				.getPreferredSize().getHeight() + 180);
		frame.setVisible(true);
	}
87212
@SuppressWarnings("unused") // called through reflection by RequestServer
  public FramesV3 column(int version, FramesV3 s) { // TODO: should return a Vec schema
    Frame frame = getFromDKV("key", s.frame_id.key());

    Vec vec = frame.vec(s.column);
    if (null == vec)
      throw new H2OColumnNotFoundArgumentException("column", s.frame_id.toString(), s.column);

    Vec[] vecs = { vec };
    String[] names = { s.column };
    Frame new_frame = new Frame(names, vecs);
    s.frames = new FrameV3[1];
    s.frames[0] = new FrameV3(new_frame);
    ((FrameV3)s.frames[0]).clearBinsField();
    return s;
  }
687576
public static void main(String[] args) throws Exception {
        RLogPanel log = new RLogPanel();
        JFrame f = new JFrame();
        f.setContentPane(log);
        f.setVisible(true);
        f.pack();
        Rsession R = RserveSession.newInstanceTry(log, null);
        R.rawEval("ls()");
    }
830688
public static void main(String[] args) {
	    if (GraphicsEnvironment.isHeadless()) {
	        System.out.println(Document.getVersion() + " Toolbox error: headless display");
	    } else
		try {
			Class c = Class.forName("com.lowagie.toolbox.Toolbox");
			Method toolboxMain = c.getMethod("main", new Class[] {args.getClass()});
			toolboxMain.invoke(null, new Object[] {args} );
		} catch (Exception e) {
			JOptionPane.showMessageDialog(null,
					"You need the iText-toolbox.jar with class com.lowagie.toolbox.Toolbox to use the iText Toolbox.",
					Document.getVersion() + " Toolbox error",
					JOptionPane.ERROR_MESSAGE);
		}
	}
1039466
public static void main(String[] args) {
        ///////////////////////////////////////////////////////////////////////////////////////////
        // If desired, set a swing look and feel here. 
        try {
            /*
            // Set a specific look and feel.
            for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
            
            // Set a random look and feel. 
            LookAndFeelInfo[] installedLooks = UIManager.getInstalledLookAndFeels();
            int lookIndex = (int) (Math.random() * installedLooks.length);
            UIManager.setLookAndFeel(installedLooks[lookIndex].getClassName());
            System.out.println(installedLooks[lookIndex].getClassName().toString());
             */
        } catch (Exception e) {
        }

        ///////////////////////////////////////////////////////////////////////////////////////////
        // Create a frame, a panel, and our demo buttons.
        frame = new JFrame();
        frame.setTitle("LGoodDatePicker Demo " + InternalUtilities.getProjectVersionString());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        panel = new DemoPanel();
        frame.getContentPane().add(panel);
        createDemoButtons();

        ///////////////////////////////////////////////////////////////////////////////////////////
        // This section creates DatePickers, with various features.
        //
        // Create variables for repeated use.
        DatePickerSettings dateSettings;
        int row = rowMultiplier;
        final LocalDate today = LocalDate.now();
        int pickerNumber = 0;

        // Create a date picker: With default settings
        datePicker1 = new DatePicker();
        panel.panel1.add(datePicker1, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Default Settings:");

        // Create a date picker: With highlight policy.
        dateSettings = new DatePickerSettings();
        datePicker2 = new DatePicker(dateSettings);
        dateSettings.setHighlightPolicy(new SampleHighlightPolicy());
        panel.panel1.add(datePicker2, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Highlight Policy:");

        // Create a date picker: With veto policy.
        // Note: Veto policies can only be set after constructing the date picker.
        dateSettings = new DatePickerSettings();
        datePicker = new DatePicker(dateSettings);
        dateSettings.setVetoPolicy(new SampleDateVetoPolicy());
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Veto Policy:");

        // Create a date picker: With both policies.
        // Note: Veto policies can only be set after constructing the date picker.
        dateSettings = new DatePickerSettings();
        datePicker = new DatePicker(dateSettings);
        dateSettings.setHighlightPolicy(new SampleHighlightPolicy());
        dateSettings.setVetoPolicy(new SampleDateVetoPolicy());
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Both Policies:");

        // Create a date picker: With Hidden text field (Showing button only).
        // Note: A developer might want to do this if they were providing their own component 
        // for displaying the date.
        dateSettings = new DatePickerSettings();
        dateSettings.setVisibleDateTextField(false);
        dateSettings.setGapBeforeButtonPixels(0);
        datePicker = new DatePicker(dateSettings);
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier),
            "Date " + (++pickerNumber) + ", Hidden text field (Showing button only):");

        // Create a date picker: With date range limits.
        // Notes: 
        // * If you only want to limit one side of the date range, you can optionally pass in null 
        // for one of the date limits.
        // * Date range limits (and other types of veto policies) can only be set after constructing 
        // the date picker.
        dateSettings = new DatePickerSettings();
        datePicker = new DatePicker(dateSettings);
        dateSettings.setDateRangeLimits(today.minusDays(20), today.plusDays(20));
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier),
            "Date " + (++pickerNumber) + ", Limit date range (+/- 20 days):");

        // Create a date picker: Custom button icon.
        // You can replace the example image with any image file that is desired.
        // See also: JButton.setPressedIcon() and JButton.setDisabledIcon().
        // Get the example image icon.
        URL dateImageURL = FullDemo.class.getResource("/images/datepickerbutton1.png");
        Image dateExampleImage = Toolkit.getDefaultToolkit().getImage(dateImageURL);
        ImageIcon dateExampleIcon = new ImageIcon(dateExampleImage);
        // Create the date picker, and apply the image icon.
        dateSettings = new DatePickerSettings();
        datePicker = new DatePicker(dateSettings);
        datePicker.setDateToToday();
        JButton datePickerButton = datePicker.getComponentToggleCalendarButton();
        datePickerButton.setText("");
        datePickerButton.setIcon(dateExampleIcon);
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Custom Icon:");

        // Create a date picker: Change calendar size.
        dateSettings = new DatePickerSettings();
        int newHeight = (int) (dateSettings.getSizeDatePanelMinimumHeight() * 1.6);
        int newWidth = (int) (dateSettings.getSizeDatePanelMinimumWidth() * 1.6);
        dateSettings.setSizeDatePanelMinimumHeight(newHeight);
        dateSettings.setSizeDatePanelMinimumWidth(newWidth);
        datePicker = new DatePicker(dateSettings);
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Change Calendar Size:");

        // Create a date picker: Show Week Numbers.
        // This will display week numbers on the left side of the calendar.
        // By default, the week number rules are specific to the locale of the settings instance.
        // For custom configuration of week numbers, see also these DatePickerSettings: 
        // setWeekNumberRules(), and setWeekNumbersForceFirstDayOfWeekToMatch();
        dateSettings = new DatePickerSettings();
        dateSettings.setWeekNumbersDisplayed(true, true);
        // If you would like the week numbers to be the same for all calendars, (instead of using
        // the default rules for the settings locale), then you could set the weekNumberRules to
        // one of these two widely used rule sets: WeekFields.ISO or WeekFields.SUNDAY_START.
        // dateSettings.setWeekNumberRules(WeekFields.SUNDAY_START);
        // dateSettings.setWeekNumberRules(WeekFields.ISO);
        datePicker = new DatePicker(dateSettings);
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Show Week Numbers:");

        // Create a date picker: Change Colors and Fonts.
        dateSettings = new DatePickerSettings();
        dateSettings.setWeekNumbersDisplayed(true, true);
        // Set backgrounds:
        dateSettings.setColor(DateArea.CalendarBackgroundNormalDates, Color.CYAN);
        dateSettings.setColor(DateArea.BackgroundOverallCalendarPanel, Color.GREEN);
        dateSettings.setColor(DateArea.BackgroundMonthAndYearMenuLabels, Color.YELLOW);
        dateSettings.setColor(DateArea.BackgroundTodayLabel, Color.YELLOW);
        dateSettings.setColor(DateArea.BackgroundClearLabel, Color.YELLOW);
        dateSettings.setColor(DateArea.BackgroundMonthAndYearNavigationButtons, Color.CYAN);
        dateSettings.setColor(DateArea.BackgroundTopLeftLabelAboveWeekNumbers, Color.ORANGE);
        dateSettings.setColor(DateArea.CalendarBackgroundSelectedDate, Color.PINK);
        dateSettings.setColor(DateArea.CalendarBorderSelectedDate, Color.WHITE);
        dateSettings.setColorBackgroundWeekdayLabels(Color.ORANGE, true);
        dateSettings.setColorBackgroundWeekNumberLabels(Color.ORANGE, true);
        // Set fonts:
        Font randomFont = new Font("Monospaced", Font.ITALIC | Font.BOLD, 20);
        Font smallerFont = new Font("Serif", Font.BOLD, 18);
        dateSettings.setFontMonthAndYearMenuLabels(randomFont);
        dateSettings.setFontMonthAndYearNavigationButtons(randomFont);
        dateSettings.setFontTodayLabel(randomFont);
        dateSettings.setFontClearLabel(randomFont);
        dateSettings.setFontCalendarDateLabels(randomFont);
        dateSettings.setFontCalendarWeekdayLabels(smallerFont);
        dateSettings.setFontCalendarWeekNumberLabels(smallerFont);
        // Set text colors:
        dateSettings.setColor(DateArea.TextMonthAndYearMenuLabels, Color.BLUE);
        dateSettings.setColor(DateArea.TextMonthAndYearNavigationButtons, Color.BLUE);
        dateSettings.setColor(DateArea.TextTodayLabel, Color.BLUE);
        dateSettings.setColor(DateArea.TextClearLabel, Color.BLUE);
        dateSettings.setColor(DateArea.CalendarTextNormalDates, Color.MAGENTA);
        dateSettings.setColor(DateArea.CalendarTextWeekdays, Color.RED);
        dateSettings.setColor(DateArea.CalendarTextWeekNumbers, Color.RED);
        // Create the date picker. 
        datePicker = new DatePicker(dateSettings);
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Change Colors and Fonts:");

        // Create a date picker: Custom font.
        dateSettings = new DatePickerSettings();
        dateSettings.setFontValidDate(new Font("Monospaced", Font.ITALIC | Font.BOLD, 17));
        dateSettings.setColor(DateArea.DatePickerTextValidDate, new Color(0, 100, 0));
        datePicker = new DatePicker(dateSettings);
        datePicker.setDateToToday();
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Custom Font:");

        // Create a date picker: Custom Date Format.
        // When creating a date pattern string for BCE dates, use "u" instead of "y" for the year.
        // For more details about that, see: DatePickerSettings.setFormatForDatesBeforeCommonEra().
        // The various codes for the date pattern string are described at this link:
        // https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
        dateSettings = new DatePickerSettings();
        dateSettings.setFormatForDatesCommonEra("yyyy/MM/dd");
        dateSettings.setFormatForDatesBeforeCommonEra("uuuu/MM/dd");
        datePicker = new DatePicker(dateSettings);
        datePicker.setDateToToday();
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Custom Date Format:");

        // Create a date picker: Another Custom Date Format.
        // When creating a date pattern string for BCE dates, use "u" instead of "y" for the year.
        // For more details about that, see: DatePickerSettings.setFormatForDatesBeforeCommonEra().
        // The various codes for the date pattern string are described at this link:
        // https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
        dateSettings = new DatePickerSettings();
        dateSettings.setFormatForDatesCommonEra("d MMM yyyy");
        dateSettings.setFormatForDatesBeforeCommonEra("d MMM uuuu");
        datePicker = new DatePicker(dateSettings);
        datePicker.setDateToToday();
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Another Custom Date Format:");

        // Create a date picker: With a fixed length date format.
        // When creating a date pattern string for BCE dates, use "u" instead of "y" for the year.
        // For more details about that, see: DatePickerSettings.setFormatForDatesBeforeCommonEra().
        // The various codes for the date pattern string are described at this link:
        // https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
        dateSettings = new DatePickerSettings();
        dateSettings.setFormatForDatesCommonEra("yyyyMMdd");
        dateSettings.setFormatForDatesBeforeCommonEra("uuuuMMdd");
        datePicker = new DatePicker(dateSettings);
        datePicker.setDateToToday();
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", With a fixed length date format:");

        // Create a date picker: Change first weekday.
        dateSettings = new DatePickerSettings();
        dateSettings.setFirstDayOfWeek(DayOfWeek.MONDAY);
        datePicker = new DatePicker(dateSettings);
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Set First Day Of Week (Mon):");

        // Create a date picker: No empty dates. (aka null)
        dateSettings = new DatePickerSettings();
        dateSettings.setAllowEmptyDates(false);
        datePicker = new DatePicker(dateSettings);
        datePicker.addDateChangeListener(
            new SampleDateChangeListener("datePicker16 (Disallow Empty Dates or Null), "));
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Disallow Empty Dates:");

        // Create a date picker: Disallow keyboard editing.
        dateSettings = new DatePickerSettings();
        dateSettings.setAllowKeyboardEditing(false);
        datePicker = new DatePicker(dateSettings);
        datePicker.setDateToToday();
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Disallow Keyboard Editing:");

        // Create a Custom Border Properties List.
        // These border properties will be used for the next two date picker examples.
        // Create a list to hold our border properties. Borders properties will be applied to the
        // calendar in the order that they appear this list.
        ArrayList<CalendarBorderProperties> borderProperties
            = new ArrayList<CalendarBorderProperties>();
        // Set all borders to be yellow, and 10 pixels thick. 
        // (Parts of the yellow border will be overwritten by other border settings.)
        borderProperties.add(new CalendarBorderProperties(
            new Point(1, 1), new Point(5, 5), Color.YELLOW, 10));
        // Make the top center border extra thick. Note: All borders in the same row or column will 
        // be displayed with the same thickness as the thickest border in the same line. 
        borderProperties.add(new CalendarBorderProperties(
            new Point(4, 1), new Point(4, 1), Color.YELLOW, 15));
        // Set the borders surrounding the date box to be green.
        borderProperties.add(new CalendarBorderProperties(
            new Point(3, 3), new Point(5, 5), Color.GREEN, 10));
        // Individually set the borders in the top corners of the date box to be blue.
        borderProperties.add(new CalendarBorderProperties(
            new Point(3, 3), new Point(3, 3), Color.BLUE, 1));
        borderProperties.add(new CalendarBorderProperties(
            new Point(5, 3), new Point(5, 3), Color.BLUE, 1));

        // Create a date picker: Custom Borders.
        // Note: Week number borders are always hidden (invisible) unless the the week numbers are 
        // displayed. ("Week number borders" are all borders located in columns 1 and 2.)
        dateSettings = new DatePickerSettings();
        dateSettings.setBorderPropertiesList(borderProperties);
        datePicker = new DatePicker(dateSettings);
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier), "Date " + (++pickerNumber)
            + ", Custom Borders:");

        // Create a date picker: Custom Borders with Week Numbers.
        // Note: Week number borders are always hidden (invisible) unless the the week numbers are 
        // displayed. ("Week number borders" are all borders located in columns 1 and 2.)
        dateSettings = new DatePickerSettings();
        dateSettings.setWeekNumbersDisplayed(true, true);
        dateSettings.setBorderPropertiesList(borderProperties);
        datePicker = new DatePicker(dateSettings);
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier),
            "Date " + (++pickerNumber) + ", Custom Borders with Week Numbers:");

        // Create a date picker: With a default year month, and limited date range.
        // Notes: 
        // * When a default YearMonth has not been set, (or is set to null), the default YearMonth
        // will be YearMonth.now().
        // * If you only want to limit one side of the date range, you can optionally pass in null 
        // for one of the date limits.
        // * Date range limits (and other types of veto policies) can only be set after constructing 
        // the date picker.
        dateSettings = new DatePickerSettings();
        datePicker = new DatePicker(dateSettings);
        LocalDate startJuly = today.plusYears(1);
        startJuly = startJuly.withMonth(7);
        startJuly = startJuly.withDayOfMonth(1);
        LocalDate endJuly = startJuly.withDayOfMonth(startJuly.lengthOfMonth());
        YearMonth yearMonthJuly = YearMonth.from(startJuly);
        dateSettings.setDefaultYearMonth(yearMonthJuly);
        dateSettings.setDateRangeLimits(startJuly.minusDays(10), endJuly.plusDays(10));
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier),
            "<html>Date " + (++pickerNumber) + ", Set Default YearMonth with Range<br>"
                + "(July Next Year + 10 days.):</html>");

        // Create a date picker: Change the text field background color.
        dateSettings = new DatePickerSettings();
        datePicker = new DatePicker(dateSettings);
        dateSettings.setColor(DateArea.TextFieldBackgroundValidDate, Color.cyan);
        panel.panel1.add(datePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel1, 1, (row++ * rowMultiplier),
            "Date " + (++pickerNumber) + ", Change the text field background color:");

        //
        ///////////////////////////////////////////////////////////////////////////////////////////
        // This section creates TimePickers. (1 to 5)
        //
        // Create some variables for repeated use.
        TimePickerSettings timeSettings;
        row = rowMultiplier;

        // Create a time picker: With default settings
        timePicker1 = new TimePicker();
        panel.panel2.add(timePicker1, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 1, Default Settings:");

        // Create a time picker: With No Buttons.
        timeSettings = new TimePickerSettings();
        timeSettings.setDisplayToggleTimeMenuButton(false);
        timeSettings.setInitialTimeToNow();
        timePicker2 = new TimePicker(timeSettings);
        panel.panel2.add(timePicker2, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 2, No Buttons:");

        // Create a time picker: With Spinner Buttons.
        timeSettings = new TimePickerSettings();
        timeSettings.setDisplayToggleTimeMenuButton(false);
        timeSettings.setDisplaySpinnerButtons(true);
        timeSettings.setInitialTimeToNow();
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 3, With Spinner Buttons:");

        // Create a time picker: With All Buttons.
        timeSettings = new TimePickerSettings();
        timeSettings.setDisplaySpinnerButtons(true);
        timeSettings.setInitialTimeToNow();
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 4, With All Buttons:");

        // Create a time picker: 15 minute interval, and 24 hour clock.
        timeSettings = new TimePickerSettings();
        timeSettings.use24HourClockFormat();
        timeSettings.initialTime = LocalTime.of(15, 30);
        timeSettings.generatePotentialMenuTimes(TimeIncrement.FifteenMinutes, null, null);
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 5, Interval 15 minutes, and 24 hour clock:");

        // Create a time picker: Localized (Chinese).
        Locale chineseLocale = new Locale("zh");
        timeSettings = new TimePickerSettings(chineseLocale);
        timeSettings.initialTime = LocalTime.now();
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 6, Localized (to Chinese):");

        // Create a time picker: Custom button icon.
        // You can replace the example image with any desired image file.
        // See also: JButton.setPressedIcon() and JButton.setDisabledIcon().
        // Get the example image icon.
        URL timeIconURL = FullDemo.class.getResource("/images/timepickerbutton1.png");
        Image timeExampleImage = Toolkit.getDefaultToolkit().getImage(timeIconURL);
        ImageIcon timeExampleIcon = new ImageIcon(timeExampleImage);
        // Create the time picker, and apply the image icon.
        timeSettings = new TimePickerSettings();
        timeSettings.initialTime = LocalTime.of(15, 00);
        timePicker = new TimePicker(timeSettings);
        JButton timePickerButton = timePicker.getComponentToggleTimeMenuButton();
        timePickerButton.setText("");
        timePickerButton.setIcon(timeExampleIcon);
        // Adjust the button size to fit the new icon.
        Dimension newTimeButtonSize = new Dimension(
            timeExampleIcon.getIconWidth() + 4, timeExampleIcon.getIconHeight() + 4);
        timePickerButton.setPreferredSize(newTimeButtonSize);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 7, Custom Icon:");

        ///////////////////////////////////////////////////////////////////////////////////////////
        // This section creates DateTimePickers. (1 to 5)
        //
        // Create a DateTimePicker: Default settings
        dateTimePicker1 = new DateTimePicker();
        panel.panel2.add(dateTimePicker1, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier),
            "DateTimePicker 1, Default settings:");

        // Create a DateTimePicker: Disallow empty dates and times.
        dateSettings = new DatePickerSettings();
        timeSettings = new TimePickerSettings();
        dateSettings.setAllowEmptyDates(false);
        timeSettings.setAllowEmptyTimes(false);
        dateTimePicker2 = new DateTimePicker(dateSettings, timeSettings);
        panel.panel2.add(dateTimePicker2, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier),
            "DateTimePicker 2, Disallow empty dates and times:");

        // Create a DateTimePicker: With change listener.
        dateTimePicker3 = new DateTimePicker();
        dateTimePicker3.addDateTimeChangeListener(new SampleDateTimeChangeListener(
            "dateTimePicker3"));
        panel.panel2.add(dateTimePicker3, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier),
            "DateTimePicker 3, With Change Listener:");

        ///////////////////////////////////////////////////////////////////////////////////////////
        // This section creates any remaining TimePickers.
        // Create a time picker: Disallow Empty Times.
        timeSettings = new TimePickerSettings();
        timeSettings.setAllowEmptyTimes(false);
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 8, Disallow Empty Times:");

        // Create a time picker: With TimeChangeListener.
        timeSettings = new TimePickerSettings();
        timePicker = new TimePicker(timeSettings);
        timePicker.addTimeChangeListener(new SampleTimeChangeListener("timePicker7"));
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 9, With a TimeChangeListener:");

        // Create a time picker: With more visible rows.
        timeSettings = new TimePickerSettings();
        timeSettings.maximumVisibleMenuRows = 20;
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 10, With 20 visible menu rows:");

        // Create a time picker: Custom Format.
        timeSettings = new TimePickerSettings();
        timeSettings.setFormatForDisplayTime("ha");
        timeSettings.setFormatForMenuTimes("ha");
        timeSettings.initialTime = LocalTime.of(15, 00);
        timeSettings.generatePotentialMenuTimes(TimeIncrement.OneHour, null, null);
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 11, Custom Format:");

        // Create a time picker: With Veto Policy.
        timeSettings = new TimePickerSettings();
        timePicker = new TimePicker(timeSettings);
        timeSettings.setVetoPolicy(new SampleTimeVetoPolicy());
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier),
            "Time 12, With Veto Policy (Only 9a-5p allowed):");

        // Create a time picker: Seconds precision.
        timeSettings = new TimePickerSettings();
        timeSettings.setFormatForDisplayTime(PickerUtilities.createFormatterFromPatternString(
            "HH:mm:ss", timeSettings.getLocale()));
        timeSettings.setFormatForMenuTimes(PickerUtilities.createFormatterFromPatternString(
            "HH:mm", timeSettings.getLocale()));
        timeSettings.initialTime = LocalTime.of(15, 00, 00);
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 13, Seconds precision (ISO format):");

        // Create a time picker: Milliseconds precision.
        timeSettings = new TimePickerSettings();
        timeSettings.setFormatForDisplayTime(PickerUtilities.createFormatterFromPatternString(
            "HH:mm:ss.SSS", timeSettings.getLocale()));
        timeSettings.setFormatForMenuTimes(PickerUtilities.createFormatterFromPatternString(
            "HH:mm", timeSettings.getLocale()));
        timeSettings.initialTime = LocalTime.of(15, 00, 00, 999000000);
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 14, Millisecond precision (ISO format):");

        // Create a time picker: Nanoseconds precision.
        timeSettings = new TimePickerSettings();
        DateTimeFormatter displayTimeFormatter = DateTimeFormatter.ISO_LOCAL_TIME;
        timeSettings.setFormatForDisplayTime(displayTimeFormatter);
        timeSettings.setFormatForMenuTimes(PickerUtilities.createFormatterFromPatternString(
            "HH:mm", timeSettings.getLocale()));
        timeSettings.initialTime = LocalTime.of(15, 00, 00, 999999999);
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier),
            "<html>Time 15, Nanosecond precision:<br/>(ISO format. Use \".\" to type nanoseconds.)</html>");

        // Create a time picker: Disallow Keyboard Editing.
        timeSettings = new TimePickerSettings();
        timeSettings.setAllowKeyboardEditing(false);
        timePicker = new TimePicker(timeSettings);
        panel.panel2.add(timePicker, getConstraints(1, (row * rowMultiplier), 1));
        panel.addLabel(panel.panel2, 1, (row++ * rowMultiplier), "Time 16, Disallow Keyboard Editing:");

        ///////////////////////////////////////////////////////////////////////////////////////////
        // This section creates any remaining DateTimePickers.
        // (None here at the moment.)
        //
        ///////////////////////////////////////////////////////////////////////////////////////////
        // This section creates date pickers and labels for demonstrating the language translations.
        int rowMarker = 0;
        addLocalizedPickerAndLabel(++rowMarker, "Arabic:", "ar");
        addLocalizedPickerAndLabel(++rowMarker, "Bulgarian:", "bg");
        addLocalizedPickerAndLabel(++rowMarker, "Chinese:", "zh");
        addLocalizedPickerAndLabel(++rowMarker, "Czech:", "cs");
        addLocalizedPickerAndLabel(++rowMarker, "Danish:", "da");
        addLocalizedPickerAndLabel(++rowMarker, "Dutch:", "nl");
        addLocalizedPickerAndLabel(++rowMarker, "English:", "en");
        addLocalizedPickerAndLabel(++rowMarker, "Finnish:", "fi");
        addLocalizedPickerAndLabel(++rowMarker, "French:", "fr");
        addLocalizedPickerAndLabel(++rowMarker, "German:", "de");
        addLocalizedPickerAndLabel(++rowMarker, "Greek:", "el");
        addLocalizedPickerAndLabel(++rowMarker, "Hindi:", "hi");
        addLocalizedPickerAndLabel(++rowMarker, "Italian:", "it");
        addLocalizedPickerAndLabel(++rowMarker, "Indonesian:", "in");
        addLocalizedPickerAndLabel(++rowMarker, "Japanese:", "ja");
        addLocalizedPickerAndLabel(++rowMarker, "Korean:", "ko");
        addLocalizedPickerAndLabel(++rowMarker, "Norwegian:", "no");
        addLocalizedPickerAndLabel(++rowMarker, "Polish:", "pl");
        addLocalizedPickerAndLabel(++rowMarker, "Portuguese:", "pt");
        addLocalizedPickerAndLabel(++rowMarker, "Romanian:", "ro");
        addLocalizedPickerAndLabel(++rowMarker, "Russian:", "ru");
        addLocalizedPickerAndLabel(++rowMarker, "Spanish:", "es");
        addLocalizedPickerAndLabel(++rowMarker, "Swedish:", "sv");
        addLocalizedPickerAndLabel(++rowMarker, "Turkish:", "tr");
        addLocalizedPickerAndLabel(++rowMarker, "Vietnamese:", "vi");

        // This section creates an independent CalendarPanel.
        // This CalendarPanel includes a calendar selection listener and a border.
        DatePickerSettings settings = new DatePickerSettings();
        CalendarPanel calendarPanel = new CalendarPanel(settings);
        calendarPanel.setSelectedDate(LocalDate.now());
        calendarPanel.addCalendarListener(new SampleCalendarListener());
        calendarPanel.setBorder(new LineBorder(Color.lightGray));
        panel.independentCalendarPanel.add(calendarPanel, CC.xy(2, 2));

        // Display the frame.
        frame.pack();
        frame.validate();
        int maxWidth = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().width;
        int maxHeight = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().height;
        frame.setSize(maxWidth / 4 * 3, maxHeight / 8 * 7);
        frame.setLocation(maxWidth / 8, maxHeight / 16);
        frame.setVisible(true);
    }
257525
public static void createProjectSkeleton( File targetDirectory, CreationBean creationBean ) throws IOException {

		if( creationBean.isMavenProject())
			createMavenProject( targetDirectory, creationBean );
		else
			createSimpleProject( targetDirectory, creationBean );
	}
982883
private void setupWizard() {
		setupComponents();
		layoutComponents();

		setMinimumSize(defaultminimumSize);

		// Center on screen
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		int xPosition = (screenSize.width / 2) - (defaultminimumSize.width / 2);
		int yPosition = (screenSize.height / 2) - (defaultminimumSize.height / 2);
		setLocation(xPosition, yPosition);

		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
	}
472785
protected void addComponent(Object o)
    {
        if (!LazyList.contains(_components,o))
        {
            _components = LazyList.add(_components,o);
            if(log.isDebugEnabled())log.debug("add component: "+o);
            ComponentEvent event = new ComponentEvent(this,o);
            for(int i=0;i<LazyList.size(_eventListeners);i++)
            {
                EventListener listener=(EventListener)LazyList.get(_eventListeners,i);
                if (listener instanceof ComponentListener)
                    ((ComponentListener)listener).addComponent(event);
            }
        }
    }
1107716
private static CallFrame initFrameForNoSuchMethod(Context cx,
            CallFrame frame, int indexReg, Object[] stack, double[] sDbl,
            int stackTop, int op, Scriptable funThisObj, Scriptable calleeScope,
            NoSuchMethodShim noSuchMethodShim, InterpretedFunction ifun)
    {
        // create an args array from the stack
        Object[] argsArray = null;
        // exactly like getArgsArray except that the first argument
        // is the method name from the shim
        int shift = stackTop + 2;
        Object[] elements = new Object[indexReg];
        for (int i=0; i < indexReg; ++i, ++shift) {
            Object val = stack[shift];
            if (val == DOUBLE_MARK) {
                val = ScriptRuntime.wrapNumber(sDbl[shift]);
            }
            elements[i] = val;
        }
        argsArray = new Object[2];
        argsArray[0] = noSuchMethodShim.methodName;
        argsArray[1] = cx.newArray(calleeScope, elements);

        // exactly the same as if it's a regular InterpretedFunction
        CallFrame callParentFrame = frame;
        if (op == Icode_TAIL_CALL) {
            callParentFrame = frame.parentFrame;
            exitFrame(cx, frame, null);
        }
        // init the frame with the underlying method with the
        // adjusted args array and shim's function
        CallFrame calleeFrame = initFrame(cx, calleeScope, funThisObj, argsArray, null,
          0, 2, ifun, callParentFrame);
        if (op != Icode_TAIL_CALL) {
            frame.savedStackTop = stackTop;
            frame.savedCallOp = op;
        }
        return calleeFrame;
    }
628559
public static void init(Context cx, Scriptable scope, boolean sealed)
    throws RhinoException {
        JSAdapter obj = new JSAdapter(cx.newObject(scope));
        obj.setParentScope(scope);
        obj.setPrototype(getFunctionPrototype(scope));
        obj.isPrototype = true;
        ScriptableObject.defineProperty(scope, "JSAdapter",  obj,
                ScriptableObject.DONTENUM);
    }
1354933
@SuppressWarnings("InfiniteLoopStatement")
	public static void main(String[] args) throws Exception {
		SimonManager.callback().addCallback(new JmxRegisterCallback("org.javasimon.examples.jmx.JmxCallbackExample"));

		Counter counter = SimonManager.getCounter("org.javasimon.examples.jmx.counter");
		Stopwatch stopwatch = SimonManager.getStopwatch("org.javasimon.examples.jmx.stopwatch");
		// these created just to have more stuff in jconsole
		SimonManager.getCounter("org.javasimon.different.counter");
		SimonManager.getStopwatch("org.javasimon.some.other.jmx.stopwatch1");
		SimonManager.getStopwatch("org.javasimon.some.other.jmx.stopwatch2");
		System.out.println("Now open jconsole and check it out...\nWatch org.javasimon.examples.jmx.stopwatch for changes.");
		while (true) {
			counter.increase();
			try (Split ignored = stopwatch.start()) {
				ExampleUtils.waitRandomlySquared(40);
			}
		}
	}
799835
public static void main(String[] s) {
		JFrame frame = new JFrame("JTextFieldDateEditor");
		JTextFieldDateEditor jTextFieldDateEditor = new JTextFieldDateEditor();
		jTextFieldDateEditor.setDate(new Date());
		frame.getContentPane().add(jTextFieldDateEditor);
		frame.pack();
		frame.setVisible(true);
	}
1270365
public static void main(String[] s) {
		JFrame frame = new JFrame("JSpinField");
		frame.getContentPane().add(new JSpinField());
		frame.pack();
		frame.setVisible(true);
	}
240688
private void initialize() {
        frmSsTraceParser = new JFrame();
        frmSsTraceParser.setTitle("SS7 Trace Parser");
        frmSsTraceParser.setResizable(false);
        frmSsTraceParser.setBounds(100, 100, 569, 716);
        frmSsTraceParser.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JPanel panel = new JPanel();
        frmSsTraceParser.getContentPane().add(panel, BorderLayout.SOUTH);

        btnStart = new JButton("Start");
        btnStart.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {
                if (tfFilePath.getText() == null || tfFilePath.getText().equals("")) {
                    JOptionPane.showMessageDialog(null, "The FilePath must be set");
                    return;
                }

                // saving parameters
                Ss7ParseParameters newPar = new Ss7ParseParameters();

                if (rdbtnTpActerna.isSelected())
                    newPar.setFileTypeN(ParseDriverType.Acterna);
                if (rdbtnTpSimpleSeq.isSelected())
                    newPar.setFileTypeN(ParseDriverType.SimpleSeq);
                if (rdbtnTpPcap.isSelected())
                    newPar.setFileTypeN(ParseDriverType.Pcap);
                if (rdbtnHexStream.isSelected())
                    newPar.setFileTypeN(ParseDriverType.HexStream);

                if (rdbtnMap.isSelected())
                    newPar.setParseProtocol(ParseProtocol.Map);
                if (rdbtnCap.isSelected())
                    newPar.setParseProtocol(ParseProtocol.Cap);
                if (rdbtnIsup.isSelected())
                    newPar.setParseProtocol(ParseProtocol.Isup);

                if (rdbtnITU.isSelected())
                    newPar.setSccpProtocolVersion(SccpProtocolVersion.ITU);
                if (rdbtnANSI.isSelected())
                    newPar.setSccpProtocolVersion(SccpProtocolVersion.ANSI);

                newPar.setSourceFilePath(tfFilePath.getText());

                if (cbApplicationContextFilter.isSelected()) {
                    try {
                        newPar.setApplicationContextFilter(Integer.parseInt(tfApplicationContextFilter.getText()));
                    } catch (NumberFormatException ee) {
                        JOptionPane
                                .showMessageDialog(null,
                                        "Can not parse ApplicationContextFilter the value. \nIt should be an Integer.\nParsing without ApplicationContextFilter");
                    }
                }
                if (cbDialogIdFilter.isSelected()) {
                    try {
                        if (!tfDialogIdFilter.getText().equals(""))
                            newPar.setDialogIdFilter(Long.parseLong(tfDialogIdFilter.getText()));
                    } catch (NumberFormatException ee) {
                        JOptionPane
                                .showMessageDialog(null,
                                        "Can not parse ApplicationContextFilter the value. \nIt should be an Integer.\nParsing without ApplicationContextFilter");
                    }
                    try {
                        if (!tfDialogIdFilter2.getText().equals(""))
                            newPar.setDialogIdFilter2(Long.parseLong(tfDialogIdFilter2.getText()));
                    } catch (NumberFormatException ee) {
                        JOptionPane
                                .showMessageDialog(null,
                                        "Can not parse ApplicationContextFilter2 the value. \nIt should be an Integer.\nParsing without ApplicationContextFilter2");
                    }
                }
                if (cbOpcDpcFilter.isSelected()) {
                    try {
                        String[] ss = tfOpcDpcFilter.getText().split(",");
                        int ii1 = ss.length;
                        Integer[] ires = new Integer[ii1];
                        for (int i1 = 0; i1 < ii1; i1++) {
                            String s = ss[i1];
                            s = s.trim();
                            ires[i1] = Integer.parseInt(s);
                        }
                        newPar.setOpcDpcFilter(ires);
                    } catch (NumberFormatException ee) {
                        JOptionPane.showMessageDialog(null,
                                "Can not parse OpcDpcFilter the value. \nIt should be a set of Integers.\nParsing without OpcDpcFilter");
                    }
                }
                if (cbMsgLog.isSelected()) {
                    newPar.setMsgLogFilePath(tfMsgLog.getText());
                }
                if (cbTcapData.isSelected()) {
                    newPar.setTcapMsgData(true);
                }
                if (cbDialogDet.isSelected()) {
                    newPar.setDetailedDialog(true);
                }
                if (cbCompDet.isSelected()) {
                    newPar.setDetailedComponents(true);
                }
                if (cbRecordingDialogMessageChain.isSelected()) {
                    newPar.setMessageChainFilePath(tfRecordingDialogMessageChain.getText());
                }

                try {
                    BufferedOutputStream bis = new BufferedOutputStream(new FileOutputStream(persistFile));
                    XMLEncoder d = new XMLEncoder(bis);
                    d.writeObject(newPar);
                    d.close();
                } catch (Exception ee) {
                    ee.printStackTrace();
                    JOptionPane.showMessageDialog(null,
                            "Failed when saving the parameter file Ss7ParseParameters.xml: " + ee.getMessage());
                }

                btnStart.setEnabled(false);
                btnGetStatisticInfo.setEnabled(false);
                btnStop.setEnabled(true);

                // starting parsing
                task = new SS7TraceParser(persistDir, newPar);
                task.parse();
            }
        });
        panel.add(btnStart);

        btnStop = new JButton("Stop");
        btnStop.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (task != null)
                    task.interrupt();
            }
        });
        btnStop.setEnabled(false);
        panel.add(btnStop);

        btnGetStatisticInfo = new JButton("Get statistic info");
        btnGetStatisticInfo.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                getStatisticInfo();
            }
        });
        panel.add(btnGetStatisticInfo);

        JPanel panel_1 = new JPanel();
        frmSsTraceParser.getContentPane().add(panel_1, BorderLayout.CENTER);
        panel_1.setLayout(null);

        JPanel panel_2 = new JPanel();
        panel_2.setBorder(new LineBorder(new Color(0, 0, 0)));
        panel_2.setBounds(10, 11, 543, 58);
        panel_1.add(panel_2);
        panel_2.setLayout(null);

        rdbtnTpActerna = new JRadioButton("Acterna");
        rdbtnTpActerna.setSelected(true);
        buttonGroup.add(rdbtnTpActerna);
        rdbtnTpActerna.setBounds(6, 28, 109, 23);
        panel_2.add(rdbtnTpActerna);

        JLabel lblSelectAFile = new JLabel("Trace file type");
        lblSelectAFile.setBounds(15, 11, 154, 14);
        panel_2.add(lblSelectAFile);

        rdbtnTpSimpleSeq = new JRadioButton("Simple sequence");
        buttonGroup.add(rdbtnTpSimpleSeq);
        rdbtnTpSimpleSeq.setBounds(137, 28, 126, 23);
        panel_2.add(rdbtnTpSimpleSeq);

        rdbtnTpPcap = new JRadioButton("Pcap");
        buttonGroup.add(rdbtnTpPcap);
        rdbtnTpPcap.setBounds(275, 28, 101, 23);
        panel_2.add(rdbtnTpPcap);

        rdbtnHexStream = new JRadioButton("Hex stream");
        buttonGroup.add(rdbtnHexStream);
        rdbtnHexStream.setBounds(380, 27, 127, 25);
        panel_2.add(rdbtnHexStream);

        tfFilePath = new JTextField();
        tfFilePath.setBounds(20, 187, 481, 20);
        panel_1.add(tfFilePath);
        tfFilePath.setColumns(10);

        JButton btnFilePath = new JButton(". . .");
        btnFilePath.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JFileChooser chooser = new JFileChooser();
                String filterName = null;
                if (rdbtnTpActerna.isSelected())
                    filterName = "Acterna";
                if (rdbtnTpSimpleSeq.isSelected())
                    filterName = "Simple";
                if (rdbtnTpPcap.isSelected())
                    filterName = "Pcap";
                if (rdbtnHexStream.isSelected())
                    filterName = "HexStream";
                TraceFileFilter filter = new TraceFileFilter(filterName);
                chooser.setFileFilter(filter);
                chooser.addChoosableFileFilter(filter);
                File f = new File(tfFilePath.getText());
                chooser.setSelectedFile(f);
                chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

                int returnVal = chooser.showOpenDialog(frmSsTraceParser);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File f2 = chooser.getSelectedFile();
                    if (f2 != null && f2.exists())
                        tfFilePath.setText(f2.getPath());
                    else
                        JOptionPane.showMessageDialog(null, "File does not exists - try again");
                }
            }
        });
        btnFilePath.setBounds(511, 186, 52, 23);
        panel_1.add(btnFilePath);

        JLabel lblPathToThe = new JLabel("Trace file path");
        lblPathToThe.setBounds(20, 172, 153, 14);
        panel_1.add(lblPathToThe);

        this.cbApplicationContextFilter = new JCheckBox("ApplicationContext filter");
        cbApplicationContextFilter.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                tfApplicationContextFilter.setEnabled(cbApplicationContextFilter.isSelected());
            }
        });
        cbApplicationContextFilter.setBounds(20, 216, 210, 23);
        panel_1.add(cbApplicationContextFilter);

        cbMsgLog = new JCheckBox("Messages logging");
        cbMsgLog.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                btnMsgLog.setEnabled(cbMsgLog.isSelected());
                tfMsgLog.setEnabled(cbMsgLog.isSelected());
                cbTcapData.setEnabled(cbMsgLog.isSelected());
                cbDialogDet.setEnabled(cbMsgLog.isSelected());
                cbCompDet.setEnabled(cbMsgLog.isSelected());
            }
        });
        cbMsgLog.setBounds(20, 308, 210, 23);
        panel_1.add(cbMsgLog);

        tfApplicationContextFilter = new JTextField();
        tfApplicationContextFilter.setEnabled(false);
        tfApplicationContextFilter.setBounds(236, 217, 153, 20);
        panel_1.add(tfApplicationContextFilter);
        tfApplicationContextFilter.setColumns(10);

        cbDialogIdFilter = new JCheckBox("DialogId filter");
        cbDialogIdFilter.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                tfDialogIdFilter.setEnabled(cbDialogIdFilter.isSelected());
                tfDialogIdFilter2.setEnabled(cbDialogIdFilter.isSelected());
            }
        });
        cbDialogIdFilter.setBounds(20, 247, 210, 23);
        panel_1.add(cbDialogIdFilter);

        tfDialogIdFilter = new JTextField();
        tfDialogIdFilter.setEnabled(false);
        tfDialogIdFilter.setColumns(10);
        tfDialogIdFilter.setBounds(236, 248, 153, 20);
        panel_1.add(tfDialogIdFilter);

        pnMsgLog = new JPanel();
        pnMsgLog.setBorder(new LineBorder(new Color(0, 0, 0)));
        pnMsgLog.setBounds(10, 338, 553, 136);
        panel_1.add(pnMsgLog);
        pnMsgLog.setLayout(null);

        tfMsgLog = new JTextField();
        tfMsgLog.setBounds(10, 27, 433, 20);
        pnMsgLog.add(tfMsgLog);
        tfMsgLog.setEnabled(false);
        tfMsgLog.setColumns(10);

        JLabel lblMessageLogFile = new JLabel("Message log file path");
        lblMessageLogFile.setBounds(10, 11, 153, 14);
        pnMsgLog.add(lblMessageLogFile);

        timer = new javax.swing.Timer(100, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                if (task != null) {
                    if (curMsgCount != task.getMsgCount()) {
                        curMsgCount = task.getMsgCount();
                        String s1 = ((Integer) curMsgCount).toString();
                        tfMsgCnt.setText(s1);
                    }

                    if (task.isFinished()) {
                        String errorMsg = task.getErrorMessage();
                        btnStart.setEnabled(true);
                        btnGetStatisticInfo.setEnabled(true);
                        btnStop.setEnabled(false);
                        parseData = task.getStatisticData();
                        task = null;

                        if (errorMsg != null)
                            JOptionPane.showMessageDialog(null, "Error: " + errorMsg);
                        else
                            JOptionPane.showMessageDialog(null, "Success");
                    }
                }
            }
        });
        timer.start();

        btnMsgLog = new JButton(". . .");
        btnMsgLog.setEnabled(false);
        btnMsgLog.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                JFileChooser chooser = new JFileChooser();
                File f = new File(tfMsgLog.getText());
                chooser.setSelectedFile(f);
                chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

                int returnVal = chooser.showOpenDialog(frmSsTraceParser);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File f2 = chooser.getSelectedFile();
                    tfMsgLog.setText(f2.getPath());
                }
            }
        });
        btnMsgLog.setBounds(453, 26, 52, 23);
        pnMsgLog.add(btnMsgLog);

        cbTcapData = new JCheckBox("Store in the log TCAP message source data");
//        cbTcapData.addItemListener(new ItemListener() {
//            public void itemStateChanged(ItemEvent e) {
//                cbDialogDet.setEnabled(cbTcapData.isSelected());
//                cbCompDet.setEnabled(cbTcapData.isSelected());
//            }
//        });
        cbTcapData.setBounds(10, 50, 296, 23);
        pnMsgLog.add(cbTcapData);

        cbDialogDet = new JCheckBox("Write dialog portion details");
        cbDialogDet.setBounds(10, 76, 296, 23);
        pnMsgLog.add(cbDialogDet);

        cbCompDet = new JCheckBox("Write components portion details");
        cbCompDet.setBounds(10, 102, 296, 23);
        pnMsgLog.add(cbCompDet);

        lblMessagesPerformed = new JLabel("Messages performed");
        lblMessagesPerformed.setBounds(10, 592, 140, 14);
        panel_1.add(lblMessagesPerformed);

        tfMsgCnt = new JTextField();
        tfMsgCnt.setEditable(false);
        tfMsgCnt.setBounds(160, 589, 86, 20);
        panel_1.add(tfMsgCnt);
        tfMsgCnt.setColumns(10);

        tfDialogIdFilter2 = new JTextField();
        tfDialogIdFilter2.setEnabled(false);
        tfDialogIdFilter2.setColumns(10);
        tfDialogIdFilter2.setBounds(399, 248, 153, 20);
        panel_1.add(tfDialogIdFilter2);

        panel_3 = new JPanel();
        panel_3.setBorder(new LineBorder(new Color(0, 0, 0)));
        panel_3.setLayout(null);
        panel_3.setBounds(10, 69, 543, 58);
        panel_1.add(panel_3);

        rdbtnMap = new JRadioButton("MAP");
        buttonGroup_1.add(rdbtnMap);
        rdbtnMap.setSelected(true);
        rdbtnMap.setBounds(6, 28, 109, 23);
        panel_3.add(rdbtnMap);

        lblProtocol = new JLabel("Protocol");
        lblProtocol.setBounds(15, 11, 154, 14);
        panel_3.add(lblProtocol);

        rdbtnCap = new JRadioButton("CAP");
        buttonGroup_1.add(rdbtnCap);
        rdbtnCap.setBounds(119, 28, 99, 23);
        panel_3.add(rdbtnCap);

        rdbtnIsup = new JRadioButton("ISUP");
        buttonGroup_1.add(rdbtnIsup);
        rdbtnIsup.setBounds(228, 28, 99, 23);
        panel_3.add(rdbtnIsup);

        cbOpcDpcFilter = new JCheckBox("Opc / Dpc filter (Ex: \"120,130\")");
        cbOpcDpcFilter.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent arg0) {
                tfOpcDpcFilter.setEnabled(cbOpcDpcFilter.isSelected());
            }
        });
        cbOpcDpcFilter.setBounds(20, 278, 210, 23);
        panel_1.add(cbOpcDpcFilter);

        tfOpcDpcFilter = new JTextField();
        tfOpcDpcFilter.setEnabled(false);
        tfOpcDpcFilter.setColumns(10);
        tfOpcDpcFilter.setBounds(236, 279, 317, 20);
        panel_1.add(tfOpcDpcFilter);

        cbRecordingDialogMessageChain = new JCheckBox("Recording of dialog message chains log");
        cbRecordingDialogMessageChain.addItemListener(new ItemListener() {
            public void itemStateChanged(ItemEvent e) {
                tfRecordingDialogMessageChain.setEnabled(cbRecordingDialogMessageChain.isSelected());
                btnRecordingDialogMessageChain.setEnabled(cbRecordingDialogMessageChain.isSelected());
            }
        });
        cbRecordingDialogMessageChain.setBounds(20, 486, 338, 23);
        panel_1.add(cbRecordingDialogMessageChain);

        JPanel pnDialogMessageMessage = new JPanel();
        pnDialogMessageMessage.setBorder(new LineBorder(new Color(0, 0, 0)));
        pnDialogMessageMessage.setBounds(10, 516, 553, 65);
        panel_1.add(pnDialogMessageMessage);
        pnDialogMessageMessage.setLayout(null);

        JLabel lblDialogMessageMessage = new JLabel("Dialog message message chains log file path");
        lblDialogMessageMessage.setBounds(10, 11, 265, 14);
        pnDialogMessageMessage.add(lblDialogMessageMessage);

        tfRecordingDialogMessageChain = new JTextField();
        tfRecordingDialogMessageChain.setBounds(10, 27, 433, 20);
        pnDialogMessageMessage.add(tfRecordingDialogMessageChain);
        tfRecordingDialogMessageChain.setEnabled(false);
        tfRecordingDialogMessageChain.setColumns(10);

        btnRecordingDialogMessageChain = new JButton(". . .");
        btnRecordingDialogMessageChain.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                JFileChooser chooser = new JFileChooser();
                File f = new File(tfRecordingDialogMessageChain.getText());
                chooser.setSelectedFile(f);
                chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);

                int returnVal = chooser.showOpenDialog(frmSsTraceParser);
                if (returnVal == JFileChooser.APPROVE_OPTION) {
                    File f2 = chooser.getSelectedFile();
                    tfRecordingDialogMessageChain.setText(f2.getPath());
                }
            }
        });
        btnRecordingDialogMessageChain.setBounds(453, 26, 52, 23);
        pnDialogMessageMessage.add(btnRecordingDialogMessageChain);
        btnRecordingDialogMessageChain.setEnabled(false);

        JPanel panel_4 = new JPanel();
        panel_4.setLayout(null);
        panel_4.setBorder(new LineBorder(new Color(0, 0, 0)));
        panel_4.setBounds(10, 128, 543, 37);
        panel_1.add(panel_4);

        rdbtnITU = new JRadioButton("ITU-T");
        buttonGroup_2.add(rdbtnITU);
        rdbtnITU.setSelected(true);
        rdbtnITU.setBounds(200, 7, 109, 23);
        panel_4.add(rdbtnITU);

        JLabel lblProtocolMua = new JLabel("Protocol M3ua / SCCP");
        lblProtocolMua.setBounds(15, 11, 154, 14);
        panel_4.add(lblProtocolMua);

        rdbtnANSI = new JRadioButton("ANSI");
        buttonGroup_2.add(rdbtnANSI);
        rdbtnANSI.setBounds(313, 7, 99, 23);
        panel_4.add(rdbtnANSI);
    }
726246
private JFrame initMainFrame()
    {
        final String title = getTitle();
        final JFrame jframe = new JFrame(title, conf);
        jframe.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
        jframe.addWindowListener(new WindowAdapter()
        {
            @Override
            public void windowClosing(WindowEvent event)
            {
                listeners.forEach(ScreenListener::notifyClosed);
            }
        });
        jframe.setResizable(false);
        jframe.setUndecorated(false);
        jframe.setIgnoreRepaint(true);

        return jframe;
    }
23927
private void createLayout()
	{
		jlabelTitle = new JLabel(newLabelHelpText());
		getContentPane().add(jlabelTitle, BorderLayout.NORTH);
		// JTextArea Help:
		jtaHelp = new JTextArea(10, 10);
		jtpHelp = new JTextPane();
		jtpHelp.replaceSelection(helptext);
		jtaHelp.setText(helptext);
		jtaHelp.setCaretPosition(0);
		jtaHelp.setLineWrap(true);
		jtaHelp.setWrapStyleWord(true);
		jtaHelp.setEditable(false);
		jscrollPanejtaHelp = new JScrollPane(jtpHelp);
		getContentPane().add(jscrollPanejtaHelp, BorderLayout.CENTER);
		buttonClose = new JButton(newLabelCloseText());
		buttonClose.addActionListener(new DisposeWindowAction(this));
		final Panel unten = new Panel();
		unten.add(buttonClose, BorderLayout.WEST);
		getContentPane().add(unten, BorderLayout.SOUTH);

	}
538338
@Nonnull
  public JSMethod method (@Nonnull @Nonempty final String sName)
  {
    final JSMethod aMethod = new JSMethod (this, sName);
    m_aMethods.add (aMethod);
    return aMethod;
  }