file_id
stringlengths
5
10
content
stringlengths
57
33.1k
repo
stringlengths
8
77
path
stringlengths
6
174
token_length
int64
19
8.19k
original_comment
stringlengths
7
10.6k
comment_type
stringclasses
2 values
detected_lang
stringclasses
1 value
prompt
stringlengths
21
33.1k
7107_3
package com.example.rekrutacja; import android.os.Bundle; import android.view.View; import androidx.appcompat.app.AppCompatActivity; import com.example.rekrutacja.databinding.ActivitySecondBinding; public class SecondActivity extends AppCompatActivity { private ActivitySecondBinding binding; @Override ...
akai-org/rekrutacja
java-mobile/app/src/main/java/com/example/rekrutacja/SecondActivity.java
896
/* TODO Zadanie Dodatkowe. Tutaj masz zupełną dowolność, jeśli masz jeszcze czas i ochotę zrób coś kreatywnego, ale jednocześnie prostego, pamiętaj jednak, aby nie naruszyć tym kodu, który realizuje poprzednich zadań. Nie jest to zadanie obowiązkowe. */
block_comment
pl
package com.example.rekrutacja; import android.os.Bundle; import android.view.View; import androidx.appcompat.app.AppCompatActivity; import com.example.rekrutacja.databinding.ActivitySecondBinding; public class SecondActivity extends AppCompatActivity { private ActivitySecondBinding binding; @Override ...
7108_1
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
/** * Program demonstrujący jak można rysować za pomocą myszy używając tylko * Swing'a. * * @author Sławomir Marczyński */
block_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_2
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
/** * Uruchamianie programu. * * Metoda main musi być statyczna, bo uruchamia się gdy jeszcze nie żadnego * obiektu - więc nie można wywoływać nie-statycznych metod. Fakt że to jest * metoda statyczna uniemożliwia np. używanie zmiennej this, odwoływanie się * do nie-statycznych pól klasy i...
block_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_3
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Java Swing wspiera rozmaite L&F, czyli może naśladować rozmaite
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_4
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// systemy operacyjne lub tworzyć interfejs graficzny właściwy tylko
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_5
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// dla Swing'u. Aby nie zaśmiecać kodu szczegółami wybór L&F jest
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_6
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// delegowany do statycznej metody setupLookAndFeel.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_7
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Tworzenie obiektu klasy Program i uruchamianie jego metody run().
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_8
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// W zasadzie można zrobić to krócej, po prostu (new Program()).run(),
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_9
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// albo nawet new Program.run(), ale tak jak poniżej też jest dobrze.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_10
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// A może nawet bardziej czytelnie - najpierw tworzymy obiekt, kolejna
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_11
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// linia aktywuje metodę run tego obiektu - w razie debugowania można
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_12
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// spokojnie przejść te kroki osobno.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_13
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
/** * Metoda run jest konieczna aby klasa Program była Runnable, tzn. miała * interfejs Runnable. W zasadzie wszystko jedno jak ją nazwiemy, mogłaby * nazywać się command albo execute, albo jeszcze inaczej. Zysk z Runnable * polega na tym, że jest to standard w Javie. */
block_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_14
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// NIE WOLNO bezpośrenio wywoływać funkcji interfejsu graficznego Swing
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_15
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// - bo oznacza to użycie wątku EDT (events-dispaching-thread) z innego
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_16
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// (naszego) wątku - i może doprowadzić do małej katastrofy. Ostępstwem
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_17
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// od tej reguły jest sytuacja gdy wątek EDT sam się do nas zgłasza, ale
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_18
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// tym razem tak nie jest. Dlatego konieczne jest "zakolejkowanie"
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_19
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// istrukcji koniecznych do wykonania w wątku EDT w kolejce EventQueue
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_20
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// tak jak poniżej.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_21
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Do EventQueue wrzuca się obiekt Runnable, niezłym pomysłem jest
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_22
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// użycie klasy anonimowej new Runnable() {...}, ale jeszcze lepsza jest
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_23
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// notacja lambda, czyli użycie ()->{...}. Zamiast kropek oczywiście są
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_24
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// konkretne instrukcje przekazane do wykonania w wątku EDT.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_25
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Po wywołaniu EventQueue.invokeLater program nie czeka na wykonanie
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_26
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// zakolejkowanych instrukcji, tylko od razu przechodzi dalej.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_27
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Najpierw pytamy o rozmiar ekranu. Uwaga: w systemach z wieloma
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_28
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// monitorami dostaniemy rozmiar monitora "primary".
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_29
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Znając rozmiary ekranu tworzone jest odpowiednio duże okno.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_30
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Unikamy jawnego podawania wielkości, dzięki temu program zadziała
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_31
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// na ekranach 8K i na dużo skromniejszych ekranach.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_32
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Tworzymy głowne (ale jeszcze puste) okno programu i określamy
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_33
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// jego preferowany rozmiar. Ustawiamy zachowanie programu po
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_34
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// zamknięciu głownego okna programu - program ma EXIT_ON_CLOSE
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_35
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// czuli ma zostać zamknięty.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_36
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Uwaga: pułapka - BoxLayout potrzebuje ContentPane a nie frame.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_37
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Tworzymy obiekt na którym można rysować - zywkle najkorzystniej
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_38
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// wybrać do tego JComponent lub JPanel. Użycie var uwalnia nas od
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_39
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// konieczności używania zmiennej o type nadklasy do przechowywania
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_40
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// wyspecjalizowanego obiektu anonimowej podklasy.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_41
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Zauważmy, że użycie po prostu klasy JComponent, zamiast obiektu
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_42
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// dziedziczącego po JComponent, spowodowałoby standardowe działanie
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_43
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// metody paint - a tym samym nie mogłoby nic narysować.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_44
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Zaszalejemy - tworzymy (pustą na razie) listę linii.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_45
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Nie jest to aż tak trudne jak mogłoby się wydawać.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_46
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
/** * Odmalowywanie zawartości okna. * * Można to robić w paint, można to robić w paintComponent. * Dla kontrolek Swing'a paint wywołuje paintComponent, potem * paintBorder i wreszcie paintChildren. Więc jeżeli zrobimy ...
block_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_47
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Graphics2D jest subklasą klasy Graphics, udostępnia wiele
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_48
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// więcej niż sama klasa Graphics. Metoda paint ma jako
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_49
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// parametr zwykłe Graphics, ale de facto dostaje zwawsze
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_50
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Graphics2D. Aby jednak używać rozszerzonych możliwości
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_51
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// trzeba najpierw "rzutować w dół" (downcast) graphics.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_52
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Teraz jest bardzo prosto - rysujemy wszystkie linie.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_53
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Jeżeli obiekt Graphics jest uzystany jako parametr
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_54
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// wywołania metody paint to nie wywołuje się dispose,
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_55
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// bo to nie my jesteśmy odpowiedzialni wtedy za recykling.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_56
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Reguła jest prosta - nie nasze - nie niszczymy.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_58
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// do recyclingu kontekst grafiki (obiekt klasy Graphics)
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_59
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// który byłby jeszcze potrzebny.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_60
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Kto powiedział że klasa anonimowa nie może mieć takich metod?
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_61
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Wywołując addMouseListener dodajemy do obiektu canvas obserwatora
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_62
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// do którego będą kierowane zdarzenia generowane przez różne rzeczy
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_63
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// robione za pomocą myszy: kliknięcia itp. Sam obserwator musi być
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_64
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// obiektem mającym interfejs MouseListener, czyli umieć obsługiwać
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_65
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// wszystko. Dla ułatwienia używa się MouseAdapter'a - klasy która
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_66
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// implementuje cały interfejs MouseListener jako nic nie robiące
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_67
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// metody. W subklasie (poniżej jest anoniomowa subklasa) można
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_68
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// nadpisać tylko te z metod MouseAdapter'a które naprawdę musimy
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_69
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// nadpisać - pozostałe pozostaną bez zmian - i o to chodzi.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_70
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Nota bene, większość kodu w NetBeans można pisać naciskając
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_71
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// ctrl+space - pojawi się menu z którego wystarczy wybrać co ma
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_72
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// być wstawione do programu.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_73
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Tu jest dość ciekawy trik - ponieważ używamy klasy anonimowej
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_74
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// to nie możemy napisać dla niej konstruktora, bo nie wiemy jak
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_75
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// się ta klasa nazywa - ale możemy przeprowadzić inicjalizację
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_76
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// przy pomocy takiego bloku jak poniżej. Nota bene, poza takimi
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_77
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// blokami można użyć także bloków ze słowem kluczowym static
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_78
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// do inicjalizowania składowych statycznych.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_79
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Jak to działa? Utworzenie nowego obiektu doda do canvas.lines
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_80
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// nową pustą listę do zbierania wyklikiwanych punktów.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_81
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Zamiast mousePressed można użyć mouseClicked - ale działa to
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_82
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// trochę gorzej - mały ruch myszy i nie łapie clicków...
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_83
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Tym razem to my występujemy z inicjatywą o kontekst
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_84
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// graficzny Graphics - więc to my wywołamy dispose na rzecz
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_85
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Ekologiczny recycling - bez tego też będzie działać,
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_86
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// ale uwalnianie kontekstu zwalnia zasoby - i to może być
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_87
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// bardzo ważne, bo z tym kontekstem wiązać się mogą bardzo
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_88
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// ograniczone zasoby systemowe.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_89
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Trochę pracy przed nami - trzeba sprawdzić który guzik
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_90
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// myszy został naciśnięty. Problem w tym że różne myszy
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_91
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// mogą mieć różne liczby guzików. Dlatego niezależnie od
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_92
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// guzików 2 i 3 można będzie używać guzika 1 z wciśniętym
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_94
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Tu podejmujemy działanie - albo dodajemy kolejny punkt
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_95
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// i odmalowujemy (wywołuje się przez to paint) canvas
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_96
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// - albo dodajemy nową listę punktów do listy list (czyli
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_97
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// kończymy rysowanie łamanej) - albo usuwamy wszystkie
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_98
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// punkty i przygotowujemy się do rysowania od nowa.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_99
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// Oczywiście canvas, jako kontrolka, jest bardzo istotnym elementem
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_100
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// programu, to można mieć jeszcze inne kontrolki, np. - tak jak tu
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
7108_101
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...
slawomirmarczynski/java
mousepaint/src/mousepaint/MousePaint.java
5,125
// - etykietkę JLabel z tekstem.
line_comment
pl
/* * The MIT License * * Copyright 2020 Sławomir Marczyński. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, c...