3276
3284
}//GEN-LAST:event_tabSourcesMouseClicked
3278
3286
private void videoDesktopMouseWheelMoved(java.awt.event.MouseWheelEvent evt) {//GEN-FIRST:event_videoDesktopMouseWheelMoved
3279
JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3280
int dir = evt.getWheelRotation();
3281
int selIndex = tabPane.getSelectedIndex();
3282
int maxIndex = tabPane.getTabCount() - 1;
3283
if ((selIndex == 0 && dir < 0) || (selIndex == maxIndex && dir > 0)) {
3284
selIndex = maxIndex - selIndex;
3287
JTabbedPane pane = (JTabbedPane) evt.getSource();
3288
int units = evt.getWheelRotation();
3289
int oldIndex = pane.getSelectedIndex();
3290
int newIndex = oldIndex + units;
3293
pane.setSelectedIndex(0);
3294
} else if (newIndex >= pane.getTabCount()) {
3295
pane.setSelectedIndex(pane.getTabCount() - 1);
3297
pane.setSelectedIndex(newIndex);
3288
tabPane.setSelectedIndex(selIndex);
3299
// JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3300
// int dir = evt.getWheelRotation();
3301
// int selIndex = tabPane.getSelectedIndex();
3302
// int maxIndex = tabPane.getTabCount() - 1;
3303
// if ((selIndex == 0 && dir < 0) || (selIndex == maxIndex && dir > 0)) {
3304
// selIndex = maxIndex - selIndex;
3308
// tabPane.setSelectedIndex(selIndex);
3289
3309
}//GEN-LAST:event_videoDesktopMouseWheelMoved
3291
3311
private void musicDesktopMouseWheelMoved(java.awt.event.MouseWheelEvent evt) {//GEN-FIRST:event_musicDesktopMouseWheelMoved
3292
JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3293
int dir = evt.getWheelRotation();
3294
int selIndex = tabPane.getSelectedIndex();
3295
int maxIndex = tabPane.getTabCount() - 1;
3296
if ((selIndex == 0 && dir < 0) || (selIndex == maxIndex && dir > 0)) {
3297
selIndex = maxIndex - selIndex;
3312
JTabbedPane pane = (JTabbedPane) evt.getSource();
3313
int units = evt.getWheelRotation();
3314
int oldIndex = pane.getSelectedIndex();
3315
int newIndex = oldIndex + units;
3318
pane.setSelectedIndex(0);
3319
} else if (newIndex >= pane.getTabCount()) {
3320
pane.setSelectedIndex(pane.getTabCount() - 1);
3322
pane.setSelectedIndex(newIndex);
3301
tabPane.setSelectedIndex(selIndex);
3324
// JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3325
// int dir = evt.getWheelRotation();
3326
// int selIndex = tabPane.getSelectedIndex();
3327
// int maxIndex = tabPane.getTabCount() - 1;
3328
// if ((selIndex == 0 && dir < 0) || (selIndex == maxIndex && dir > 0)) {
3329
// selIndex = maxIndex - selIndex;
3333
// tabPane.setSelectedIndex(selIndex);
3302
3334
}//GEN-LAST:event_musicDesktopMouseWheelMoved
3304
3336
private void pictureDesktopMouseWheelMoved(java.awt.event.MouseWheelEvent evt) {//GEN-FIRST:event_pictureDesktopMouseWheelMoved
3305
JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3306
int dir = evt.getWheelRotation();
3307
int selIndex = tabPane.getSelectedIndex();
3308
int maxIndex = tabPane.getTabCount() - 1;
3309
if ((selIndex == 0 && dir < 0) || (selIndex == maxIndex && dir > 0)) {
3310
selIndex = maxIndex - selIndex;
3337
JTabbedPane pane = (JTabbedPane) evt.getSource();
3338
int units = evt.getWheelRotation();
3339
int oldIndex = pane.getSelectedIndex();
3340
int newIndex = oldIndex + units;
3343
pane.setSelectedIndex(0);
3344
} else if (newIndex >= pane.getTabCount()) {
3345
pane.setSelectedIndex(pane.getTabCount() - 1);
3347
pane.setSelectedIndex(newIndex);
3314
tabPane.setSelectedIndex(selIndex);
3349
// JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3350
// int dir = evt.getWheelRotation();
3351
// int selIndex = tabPane.getSelectedIndex();
3352
// int maxIndex = tabPane.getTabCount() - 1;
3353
// if ((selIndex == 0 && dir < 0) || (selIndex == maxIndex && dir > 0)) {
3354
// selIndex = maxIndex - selIndex;
3358
// tabPane.setSelectedIndex(selIndex);
3315
3359
}//GEN-LAST:event_pictureDesktopMouseWheelMoved
3317
3361
private void textDesktopMouseWheelMoved(java.awt.event.MouseWheelEvent evt) {//GEN-FIRST:event_textDesktopMouseWheelMoved
3318
JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3319
int dir = evt.getWheelRotation();
3320
int selIndex = tabPane.getSelectedIndex();
3321
int maxIndex = tabPane.getTabCount() - 1;
3322
if ((selIndex == 0 && dir < 0) || (selIndex == maxIndex && dir > 0)) {
3323
selIndex = maxIndex - selIndex;
3362
JTabbedPane pane = (JTabbedPane) evt.getSource();
3363
int units = evt.getWheelRotation();
3364
int oldIndex = pane.getSelectedIndex();
3365
int newIndex = oldIndex + units;
3368
pane.setSelectedIndex(0);
3369
} else if (newIndex >= pane.getTabCount()) {
3370
pane.setSelectedIndex(pane.getTabCount() - 1);
3372
pane.setSelectedIndex(newIndex);
3327
tabPane.setSelectedIndex(selIndex);
3374
// JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3375
// int dir = evt.getWheelRotation();
3376
// int selIndex = tabPane.getSelectedIndex();
3377
// int maxIndex = tabPane.getTabCount() - 1;
3378
// if ((selIndex == 0 && dir < 0) || (selIndex == maxIndex && dir > 0)) {
3379
// selIndex = maxIndex - selIndex;
3383
// tabPane.setSelectedIndex(selIndex);
3328
3384
}//GEN-LAST:event_textDesktopMouseWheelMoved
3330
3386
private void videoDesktopStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_videoDesktopStateChanged
3331
3387
if (editingPhase) {
3332
3388
JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3333
3389
int selIndex = tabPane.getSelectedIndex();
3334
if (selIndex != -1) {
3335
String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3336
for (Stream s : streamS) {
3337
if (s.getName().equals(streamName)) {
3339
if (s.isPlaying()) {
3340
btnRemoveSource.setEnabled(false);
3342
btnRemoveSource.setEnabled(true);
3390
// System.out.println("StateChanged Index = " + tabPane.getSelectedIndex());
3391
Runnable task = () -> {
3392
if (selIndex == tabPane.getSelectedIndex()) {
3393
// System.out.println("StateChanged Old Index = " + selIndex);
3394
if (selIndex != -1) {
3395
String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3396
for (Stream s : streamS) {
3397
if (s.getName().equals(streamName)) {
3399
if (s.isPlaying()) {
3400
btnRemoveSource.setEnabled(false);
3402
btnRemoveSource.setEnabled(true);
3410
worker.schedule(task, 1, TimeUnit.SECONDS);
3411
// if (selIndex != -1) {
3412
// String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3413
// for (Stream s : streamS) {
3414
// if (s.getName().equals(streamName)) {
3415
// selectedSource(s);
3416
// if (s.isPlaying()) {
3417
// btnRemoveSource.setEnabled(false);
3419
// btnRemoveSource.setEnabled(true);
3348
3425
}//GEN-LAST:event_videoDesktopStateChanged
3351
3428
if (editingPhase) {
3352
3429
JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3353
3430
int selIndex = tabPane.getSelectedIndex();
3354
if (selIndex != -1) {
3355
String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3356
for (Stream s : streamS) {
3357
if (s.getName().equals(streamName)) {
3359
if (s.isPlaying()) {
3360
btnRemoveSource.setEnabled(false);
3362
btnRemoveSource.setEnabled(true);
3431
Runnable task = () -> {
3432
if (selIndex == tabPane.getSelectedIndex()) {
3433
// System.out.println("StateChanged Old Index = " + selIndex);
3434
if (selIndex != -1) {
3435
String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3436
for (Stream s : streamS) {
3437
if (s.getName().equals(streamName)) {
3439
if (s.isPlaying()) {
3440
btnRemoveSource.setEnabled(false);
3442
btnRemoveSource.setEnabled(true);
3450
worker.schedule(task, 1, TimeUnit.SECONDS);
3451
// if (selIndex != -1) {
3452
// String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3453
// for (Stream s : streamS) {
3454
// if (s.getName().equals(streamName)) {
3455
// selectedSource(s);
3456
// if (s.isPlaying()) {
3457
// btnRemoveSource.setEnabled(false);
3459
// btnRemoveSource.setEnabled(true);
3368
3465
}//GEN-LAST:event_musicDesktopStateChanged
3371
3468
if (editingPhase) {
3372
3469
JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3373
3470
int selIndex = tabPane.getSelectedIndex();
3374
if (selIndex != -1) {
3375
String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3376
for (Stream s : streamS) {
3377
if (s.getName().equals(streamName)) {
3379
if (s.isPlaying()) {
3380
btnRemoveSource.setEnabled(false);
3382
btnRemoveSource.setEnabled(true);
3471
Runnable task = () -> {
3472
if (selIndex == tabPane.getSelectedIndex()) {
3473
// System.out.println("StateChanged Old Index = " + selIndex);
3474
if (selIndex != -1) {
3475
String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3476
for (Stream s : streamS) {
3477
if (s.getName().equals(streamName)) {
3479
if (s.isPlaying()) {
3480
btnRemoveSource.setEnabled(false);
3482
btnRemoveSource.setEnabled(true);
3490
worker.schedule(task, 1, TimeUnit.SECONDS);
3491
// if (selIndex != -1) {
3492
// String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3493
// for (Stream s : streamS) {
3494
// if (s.getName().equals(streamName)) {
3495
// selectedSource(s);
3496
// if (s.isPlaying()) {
3497
// btnRemoveSource.setEnabled(false);
3499
// btnRemoveSource.setEnabled(true);
3388
3505
}//GEN-LAST:event_pictureDesktopStateChanged
3391
3508
if (editingPhase) {
3392
3509
JTabbedPane tabPane = (JTabbedPane) evt.getSource();
3393
3510
int selIndex = tabPane.getSelectedIndex();
3394
if (selIndex != -1) {
3395
String streamName = tabPane.getTitleAt(selIndex);
3396
for (Stream s : streamS) {
3397
if (s.getName().equals(streamName)) {
3399
if (s.isPlaying()) {
3400
btnRemoveSource.setEnabled(false);
3402
btnRemoveSource.setEnabled(true);
3511
Runnable task = () -> {
3512
if (selIndex == tabPane.getSelectedIndex()) {
3513
// System.out.println("StateChanged Old Index = " + selIndex);
3514
if (selIndex != -1) {
3515
String streamName = tabPane.getTitleAt(selIndex).replace("<html><body><table width='20'>", "").replace("</table></body></html>", "").replace("<span></span>", "");
3516
for (Stream s : streamS) {
3517
if (s.getName().equals(streamName)) {
3519
if (s.isPlaying()) {
3520
btnRemoveSource.setEnabled(false);
3522
btnRemoveSource.setEnabled(true);
3530
worker.schedule(task, 1, TimeUnit.SECONDS);
3531
// if (selIndex != -1) {
3532
// String streamName = tabPane.getTitleAt(selIndex);
3533
// for (Stream s : streamS) {
3534
// if (s.getName().equals(streamName)) {
3535
// selectedSource(s);
3536
// if (s.isPlaying()) {
3537
// btnRemoveSource.setEnabled(false);
3539
// btnRemoveSource.setEnabled(true);
3408
3545
}//GEN-LAST:event_textDesktopStateChanged