исправление безопасности. промежуточный.
This commit is contained in:
@@ -20,7 +20,12 @@ public class Pass<T> {
|
||||
public PassState state = PassState.Inactive; //текущее состояние прохода.
|
||||
public Semaphore animation_sem;
|
||||
//--------------
|
||||
public boolean ui_visible = true;
|
||||
public Vector<PassControl> controls = new Vector<>();
|
||||
public void addControl(PassControl control_in){
|
||||
control_in.setVisible(ui_visible);
|
||||
controls.add(control_in);
|
||||
}
|
||||
public TextLog Log; //внутренний журнал прохода.
|
||||
protected boolean interrupt;
|
||||
protected SwingWorker dispatcher = null;
|
||||
@@ -74,8 +79,9 @@ public class Pass<T> {
|
||||
control.setEnabled(flag);
|
||||
}
|
||||
public void setControlsVisible(boolean flag) {
|
||||
ui_visible =flag;
|
||||
for (PassControl control : controls)
|
||||
control.setVisible(flag);
|
||||
control.setVisible(ui_visible);
|
||||
}
|
||||
public void setControlsToolTipText(String text) {
|
||||
for (PassControl control : controls)
|
||||
|
||||
@@ -16,7 +16,7 @@ public class PassButton extends MenuBarButton implements PassControl {
|
||||
setIcon(pass.getIconPath());
|
||||
}
|
||||
addActionListener(pass.getControlAction());
|
||||
pass.controls.add(this);
|
||||
pass.addControl(this);
|
||||
}
|
||||
public PassButton(Pass pass) {
|
||||
this(pass, false);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package Common.Visual.Controls;
|
||||
import Common.Passes.Pass;
|
||||
public interface PassControl {
|
||||
void setIcon(String icon_path);
|
||||
void setEnabled(boolean flag);
|
||||
|
||||
@@ -8,7 +8,7 @@ public class PassMenuItem extends VisualiserMenuItem implements PassControl {
|
||||
setToolTipText(pass.getDescription());
|
||||
if (pass.getIconPath() != null) setIcon(pass.getIconPath());
|
||||
addActionListener(pass.getControlAction());
|
||||
pass.controls.add(this);
|
||||
pass.addControl(this);
|
||||
}
|
||||
@Override
|
||||
public void setIcon(String icon_path) {
|
||||
|
||||
@@ -7,7 +7,7 @@ public class StablePassMenuItem extends StableMenuItem implements PassControl {
|
||||
setToolTipText(pass.getDescription());
|
||||
if (pass.getIconPath() != null) setIcon(pass.getIconPath());
|
||||
addActionListener(pass.getControlAction());
|
||||
pass.controls.add(this);
|
||||
pass.addControl(this);
|
||||
}
|
||||
@Override
|
||||
public void setIcon(String icon_path) {
|
||||
|
||||
Reference in New Issue
Block a user