home *** CD-ROM | disk | FTP | other *** search
- package netscape.application;
-
- import java.awt.Component;
- import netscape.util.InconsistencyException;
- import netscape.util.Vector;
-
- public class RootView extends View implements EventProcessor, ExtendedTarget {
- Color _backgroundColor;
- Image _image;
- FoundationPanel panel;
- Application application;
- Timer _autoscrollTimer;
- ColorChooser colorChooser;
- FontChooser fontChooser;
- InternalWindow _mainWindow;
- View _mouseView;
- View _moveView;
- View _focusedView;
- View _windowClipView;
- View _mouseClickView;
- View _rootViewFocusedView;
- View _selectedView;
- View _defaultSelectedView;
- Vector windows;
- long _lastClickTime;
- int _clickCount;
- int _mouseX;
- int _mouseY;
- int _currentCursor;
- int _viewCursor;
- int _overrideCursor;
- int mouseDownCount;
- int _imageDisplayStyle;
- Vector dirtyViews;
- boolean _redrawTransWindows;
- boolean recomputeCursor;
- boolean recomputeMoveView;
- boolean isVisible;
- boolean redrawAll;
- Vector componentViews;
- MouseFilter mouseFilter;
- static Vector _commands = new Vector();
- static final String VALIDATE_SELECTED_VIEW = "validateSelectedView";
-
- public RootView() {
- this(0, 0, 0, 0);
- }
-
- public RootView(Rect var1) {
- this(var1.x, var1.y, var1.width, var1.height);
- }
-
- public RootView(int var1, int var2, int var3, int var4) {
- super(var1, var2, var3, var4);
- this.windows = new Vector();
- this._overrideCursor = -1;
- this.dirtyViews = new Vector();
- this._redrawTransWindows = true;
- this.redrawAll = true;
- this.mouseFilter = new MouseFilter();
- this._backgroundColor = Color.gray;
- this.application = Application.application();
- this._defaultSelectedView = this;
- }
-
- void addWindowRelativeTo(InternalWindow var1, int var2, InternalWindow var3) {
- if (var1 != null) {
- if (this._windowClipView != null && var1.layer() < 500) {
- this._windowClipView.addSubview(var1);
- } else {
- ((View)this).addSubview(var1);
- }
-
- this.makeWindowVisible(var1, var2, var3);
- }
- }
-
- void removeWindow(InternalWindow var1) {
- if (var1 != null) {
- Rect var4 = this.absoluteWindowBounds(var1);
- ((View)var1).removeFromSuperview();
- int var3 = this.windows.indexOf(var1) - 1;
- if (var3 < 0) {
- this.windows.indexOf(var1);
- }
-
- this.windows.removeElement(var1);
- if (var1 == this._mainWindow) {
- InternalWindow var2 = null;
-
- for(int var5 = this.windows.count() - 1; var5 >= 0; --var5) {
- if (((InternalWindow)this.windows.elementAt(var5)).canBecomeMain()) {
- var2 = (InternalWindow)this.windows.elementAt(var5);
- break;
- }
- }
-
- this._setMainWindow(var2);
- }
-
- this.redraw(var4);
- this.redrawTransparentWindows(var4, (InternalWindow)null);
- if (!(var1 instanceof KeyboardArrow)) {
- this.validateSelectedView();
- }
-
- this.createMouseEnterLater();
- }
- }
-
- public Vector internalWindows() {
- return this.windows;
- }
-
- public InternalWindow mainWindow() {
- return this._mainWindow;
- }
-
- void _setMainWindow(InternalWindow var1) {
- if (this._mainWindow != var1 && (var1 == null || var1.canBecomeMain())) {
- InternalWindow var2 = this._mainWindow;
- this._mainWindow = var1;
- if (var2 != null) {
- var2.didResignMain();
- } else if (this._focusedView != null && !this.isInWindow(this._focusedView)) {
- this._rootViewFocusedView = this._focusedView;
- this.setFocusedView((View)null, false);
- }
-
- if (this._mainWindow != null) {
- this._mainWindow.didBecomeMain();
- } else if (this.rootViewFocusedView() != null) {
- this.setFocusedView(this.rootViewFocusedView(), false);
- this._rootViewFocusedView = null;
- }
-
- this.validateSelectedView();
- this.createMouseEnterLater();
- }
- }
-
- InternalWindow frontWindowWithLayer(int var1) {
- for(int var2 = this.windows.count() - 1; var2 >= 0; --var2) {
- InternalWindow var3 = (InternalWindow)this.windows.elementAt(var2);
- if (var3.layer() == var1) {
- return var3;
- }
- }
-
- return null;
- }
-
- InternalWindow backWindowWithLayer(int var1) {
- int var3 = this.windows.count();
-
- for(int var2 = 0; var2 < var3; ++var2) {
- InternalWindow var4 = (InternalWindow)this.windows.elementAt(var2);
- if (var4.layer() == var1) {
- return var4;
- }
- }
-
- return null;
- }
-
- void makeWindowVisible(InternalWindow var1, int var2, InternalWindow var3) {
- InternalWindow var4 = null;
- if (var1 != null) {
- if (((View)var1).descendsFrom(this)) {
- int var5 = this.windows.indexOf(var1);
- int var6 = var1.layer();
- if (var3 != null) {
- if (var3.layer() > var6) {
- var3 = null;
- var2 = 0;
- } else if (var3.layer() < var6) {
- var3 = null;
- var2 = 1;
- }
- }
-
- this.windows.removeElement(var1);
- if (var3 != null) {
- boolean var8;
- if (var2 == 0) {
- var8 = this.windows.insertElementAfter(var1, var3);
- } else {
- var8 = this.windows.insertElementBefore(var1, var3);
- }
-
- if (var8) {
- this._setMainWindow(var1);
- if (var5 != this.windows.indexOf(var1)) {
- ((View)var1).draw();
- this.updateTransWindows(var1);
- if (var2 == 1) {
- this.updateWindowsAbove(var1);
- }
- }
-
- return;
- }
-
- Object var10 = null;
- }
-
- int var7 = this.windows.count();
-
- while(var7-- > 0) {
- var4 = (InternalWindow)this.windows.elementAt(var7);
- if (var4.layer() <= var6 && var4.layer() <= var6) {
- break;
- }
- }
-
- boolean var9;
- if (var4 == null) {
- this.windows.insertElementAt(var1, 0);
- var9 = true;
- } else if (var4.layer() > var6) {
- var9 = this.windows.insertElementBefore(var1, var4);
- } else {
- var9 = this.windows.insertElementAfter(var1, var4);
- }
-
- if (!var9) {
- this.windows.insertElementAt(var1, 0);
- }
-
- this._setMainWindow(var1);
- if (var5 != this.windows.indexOf(var1)) {
- ((View)var1).draw();
- this.updateTransWindows(var1);
- }
-
- }
- }
- }
-
- void updateWindowsAbove(InternalWindow var1) {
- Rect var6 = this.absoluteWindowBounds(var1);
- int var5 = this.windows.indexOf(var1);
- Rect var8 = new Rect();
- int var3 = var5 + 1;
-
- for(int var4 = this.windows.count(); var3 < var4; ++var3) {
- InternalWindow var2 = (InternalWindow)this.windows.elementAt(var3);
- Rect var7 = this.absoluteWindowBounds(var2);
- if (var6.intersects(var7)) {
- var8.setBounds(var6);
- var8.intersectWith(var7);
- ((View)this).convertRectToView(var2, var8, var8);
- ((View)var2).addDirtyRect(var8);
- }
- }
-
- }
-
- void updateTransWindows(InternalWindow var1) {
- if (var1 != null) {
- int var5 = this.windows.indexOf(var1);
- Rect var3 = ((View)var1).superview().convertRectToView(this, var1.bounds);
-
- for(int var4 = 0; var4 < var5; ++var4) {
- InternalWindow var2 = (InternalWindow)this.windows.elementAt(var4);
- if (var2.isTransparent()) {
- Rect var6 = this.absoluteWindowBounds(var2);
- if (var6.intersects(var3) || var3.intersects(var6)) {
- var2.updateDrawingBuffer();
- }
- }
- }
-
- }
- }
-
- void disableWindowsAbove(InternalWindow var1, boolean var2) {
- if (var1 != null) {
- int var4 = this.windows.indexOf(var1);
- if (var4 != -1) {
- for(int var5 = this.windows.count(); var4 < var5; ++var4) {
- InternalWindow var3 = (InternalWindow)this.windows.elementAt(var4);
- if (var2) {
- ((View)var3).disableDrawing();
- } else {
- ((View)var3).reenableDrawing();
- }
- }
-
- }
- }
- }
-
- Vector windowRects(Rect var1, InternalWindow var2) {
- Vector var4 = null;
- int var6 = this.windows.count();
- int var5;
- if (var2 != null) {
- var5 = this.windows.indexOf(var2) + 1;
- } else {
- var5 = 0;
- }
-
- for(; var5 < var6; ++var5) {
- InternalWindow var3 = (InternalWindow)this.windows.elementAt(var5);
- Rect var7 = this.absoluteWindowBounds(var3);
- if (var7.intersects(var1) || var1.intersects(var7)) {
- if (var4 == null) {
- var4 = VectorCache.newVector();
- }
-
- var4.addElement(new Rect(var7));
- }
- }
-
- return var4;
- }
-
- void setRedrawTransparentWindows(boolean var1) {
- this._redrawTransWindows = var1;
- }
-
- public void redrawTransparentWindows(Rect var1, InternalWindow var2) {
- this.redrawTransparentWindows((Graphics)null, var1, var2);
- }
-
- public void redrawTransparentWindows(Graphics var1, Rect var2, InternalWindow var3) {
- Rect var7 = null;
- if (this._redrawTransWindows) {
- int var6 = this.windows.count();
- int var5;
- if (var3 != null) {
- var5 = this.windows.indexOf(var3) + 1;
- } else {
- var5 = 0;
- }
-
- for(; var5 < var6; ++var5) {
- InternalWindow var4 = (InternalWindow)this.windows.elementAt(var5);
- if (var4.isTransparent()) {
- Rect var8 = this.absoluteWindowBounds(var4);
- if (var8.intersects(var2)) {
- if (var7 == null) {
- var7 = Rect.newRect();
- }
-
- ((View)this).convertRectToView(var4, var2, var7);
- var4.draw(var1, var7);
- }
- }
- }
-
- if (var7 != null) {
- Rect.returnRect(var7);
- }
-
- }
- }
-
- void paint(ApplicationEvent var1) {
- UpdateFilter var2 = new UpdateFilter(var1.rect());
- var2.rootView = this;
-
- try {
- Thread.sleep(100L);
- } catch (InterruptedException var4) {
- }
-
- this.application.eventLoop().filterEvents(var2);
- if (this.redrawAll) {
- Rect var3 = Rect.newRect(0, 0, super.bounds.width, super.bounds.height);
- this.redraw(var3);
- this.redrawTransparentWindows(var3, (InternalWindow)null);
- Rect.returnRect(var3);
- } else {
- this.redraw(var2._rect);
- this.redrawTransparentWindows(var2._rect, (InternalWindow)null);
- }
-
- AWTCompatibility.awtToolkit().sync();
- }
-
- void print(ApplicationEvent var1) {
- Rect var2 = new Rect(0, 0, ((View)this).width(), ((View)this).height());
- Graphics var3 = new Graphics(var2, var1.graphics());
- this.redraw(var3, var2);
- this.redrawTransparentWindows(var3, var2, (InternalWindow)null);
- }
-
- void resize(ApplicationEvent var1) {
- ResizeFilter var2 = new ResizeFilter();
-
- try {
- Thread.sleep(50L);
- } catch (InterruptedException var3) {
- }
-
- var2.lastEvent = var1;
- this.application.eventLoop().filterEvents(var2);
- ((View)this).sizeTo(var2.lastEvent.rect().width, var2.lastEvent.rect().height);
- }
-
- public void setMouseView(View var1) {
- this._mouseView = var1;
- }
-
- public View mouseView() {
- return this._mouseView;
- }
-
- public View viewForMouse(int var1, int var2) {
- View var4 = null;
-
- InternalWindow var3;
- Rect var6;
- for(int var5 = this.windows.count(); var5-- > 0 && var4 == null; var4 = var3.viewForMouse(var1 - var6.x, var2 - var6.y)) {
- var3 = (InternalWindow)this.windows.elementAt(var5);
- var6 = this.absoluteWindowBounds(var3);
- }
-
- return var4 != null ? var4 : super.viewForMouse(var1, var2);
- }
-
- void _mouseDown(MouseEvent var1) {
- ++this.mouseDownCount;
- if (this.mouseDownCount <= 1) {
- View var3 = this.viewForMouse(var1.x, var1.y);
- if (var3 == null) {
- this._mouseView = null;
- } else {
- long var5 = var1.timeStamp;
- if (this._mouseClickView == var3 && var5 - this._lastClickTime < 250L) {
- ++this._clickCount;
- } else {
- this._clickCount = 1;
- }
-
- this._lastClickTime = var5;
- var1.setClickCount(this._clickCount);
- this._mouseView = this._mouseClickView = var3;
- if (!this.viewExcludedFromModalSession(var3)) {
- if (!(this._mouseView instanceof InternalWindow)) {
- InternalWindow var2 = this._mouseView.window();
- if (!(this._mouseView instanceof MenuView) || var2 != null) {
- this._setMainWindow(var2);
- }
- }
-
- var1.x -= this._mouseView.absoluteX();
- var1.y -= this._mouseView.absoluteY();
- View var4 = this._mouseView;
- if (!this._mouseView.mouseDown(var1) && var4 == this._mouseView) {
- this._mouseView = null;
- }
-
- }
- }
- }
- }
-
- public boolean isVisible() {
- return this.isVisible;
- }
-
- void setVisible(boolean var1) {
- if (this.isVisible != var1) {
- this.isVisible = var1;
- if (this.isVisible) {
- ((View)this).ancestorWasAddedToViewHierarchy(this);
- if (this._focusedView != null) {
- this._focusedView._startFocus();
- Application.application().focusChanged(this._focusedView);
- return;
- }
- } else {
- ((View)this).ancestorWillRemoveFromViewHierarchy(this);
- if (this._focusedView != null) {
- this._focusedView._pauseFocus();
- }
- }
- }
-
- }
-
- void _mouseDrag(MouseEvent var1) {
- if (!this.viewExcludedFromModalSession(this._mouseView)) {
- if (this._mouseView != null) {
- boolean var3 = this._mouseView.containsPointInVisibleRect(var1.x, var1.y);
- if (this._mouseView.wantsAutoscrollEvents() && !var3) {
- if (this._autoscrollTimer == null) {
- Autoscroller var4 = new Autoscroller();
- this._autoscrollTimer = new Timer(var4, "autoscroll", 100);
- this._autoscrollTimer.start();
- this._autoscrollTimer.setData(this._mouseView);
- var4.setEvent(this._mouseView.convertEventToView((View)null, var1));
- } else {
- Autoscroller var2 = (Autoscroller)this._autoscrollTimer.target();
- var2.setEvent(this._mouseView.convertEventToView((View)null, var1));
- }
- } else {
- if (this._autoscrollTimer != null) {
- this._autoscrollTimer.stop();
- this._autoscrollTimer = null;
- }
-
- var1.setClickCount(this._clickCount);
- this._mouseView.mouseDragged(var1);
- }
- } else {
- if (this._autoscrollTimer != null) {
- this._autoscrollTimer.stop();
- this._autoscrollTimer = null;
- }
-
- }
- }
- }
-
- void _mouseUp(MouseEvent var1) {
- --this.mouseDownCount;
- if (this.mouseDownCount <= 0) {
- if (!this.viewExcludedFromModalSession(this._mouseView)) {
- if (this._mouseView != null) {
- var1.setClickCount(this._clickCount);
- this._mouseView.mouseUp(var1);
- if (this._autoscrollTimer != null) {
- this._autoscrollTimer.stop();
- this._autoscrollTimer = null;
- }
- }
-
- View var2 = this.viewForMouse(this._mouseX, this._mouseY);
- if (var2 != this._moveView) {
- this.createMouseEnter();
- }
-
- this._mouseClickView = this._mouseView;
- this._mouseView = null;
- }
- }
- }
-
- void createMouseEnter() {
- MouseEvent var1 = new MouseEvent(System.currentTimeMillis(), -4, this._mouseX, this._mouseY, 0);
- this._mouseEnter(var1);
- }
-
- void createMouseEnterLater() {
- if (this._mouseView == null) {
- this.recomputeMoveView = true;
- }
-
- }
-
- void _mouseEnter(MouseEvent var1) {
- this._mouseMove(var1);
- }
-
- void _mouseMove(MouseEvent var1) {
- View var2 = this.viewForMouse(var1.x, var1.y);
- if (!this.viewExcludedFromModalSession(var2)) {
- if (var2 == this._moveView) {
- if (this._moveView == null) {
- return;
- }
-
- MouseEvent var4 = ((View)this).convertEventToView(this._moveView, var1);
- this._moveView.mouseMoved(var4);
- } else {
- View var3 = this._moveView;
- this._moveView = var2;
- if (var3 != null) {
- MouseEvent var5 = ((View)this).convertEventToView(var3, var1);
- ((Event)var5).setType(-6);
- var3.mouseExited(var5);
- }
-
- if (this._moveView != null) {
- MouseEvent var6 = ((View)this).convertEventToView(this._moveView, var1);
- ((Event)var6).setType(-4);
- this._moveView.mouseEntered(var6);
- }
- }
-
- this.updateCursorLater();
- }
- }
-
- void _mouseExit(MouseEvent var1) {
- if (this._moveView != null) {
- this._moveView.mouseExited(((View)this).convertEventToView(this._moveView, var1));
- this._moveView = null;
- this.updateCursorLater();
- }
-
- }
-
- void flushCursor() {
- int var1;
- if (this._overrideCursor != -1) {
- var1 = this._overrideCursor;
- } else {
- var1 = this._viewCursor;
- }
-
- if (var1 != this._currentCursor) {
- this.panel.setCursor(var1);
- this._currentCursor = var1;
- }
-
- }
-
- void computeCursor() {
- View var1 = this.viewForMouse(this._mouseX, this._mouseY);
- if (var1 != null) {
- Point var2 = Point.newPoint();
- ((View)this).convertToView(var1, this._mouseX, this._mouseY, var2);
- this._viewCursor = var1.cursorForPoint(var2.x, var2.y);
- Point.returnPoint(var2);
- } else {
- this._viewCursor = 0;
- }
-
- this.flushCursor();
- }
-
- public int cursor() {
- return this._currentCursor;
- }
-
- public void setOverrideCursor(int var1) {
- if (var1 >= -1 && var1 <= 13) {
- if (this._overrideCursor != var1) {
- this._overrideCursor = var1;
- this.flushCursor();
- }
-
- } else {
- throw new InconsistencyException("Unknown cursor type: " + var1);
- }
- }
-
- public void removeOverrideCursor() {
- this.setOverrideCursor(-1);
- }
-
- public void updateCursor() {
- this.computeCursor();
- }
-
- public void updateCursorLater() {
- this.recomputeCursor = true;
- }
-
- void _updateCursorAndMoveView() {
- if (this.recomputeMoveView) {
- this.createMouseEnter();
- this.recomputeMoveView = false;
- this.recomputeCursor = false;
- } else {
- if (this.recomputeCursor) {
- this.computeCursor();
- this.recomputeCursor = false;
- }
-
- }
- }
-
- void _keyDown(KeyEvent var1) {
- boolean var4 = false;
- Object var5 = null;
- View var2 = this._focusedView;
- ExternalWindow var3 = this.externalWindow();
- if (var3 != null && var3.menu() != null) {
- if (JDK11AirLock.menuShortcutExists()) {
- MenuItem var6 = var3.menu().itemForKeyEvent(var1);
- if (var6 != null) {
- var4 = true;
- }
- } else {
- var4 = var3.menu().handleCommandKeyEvent(var1);
- }
- }
-
- if (!var4) {
- if (this.processKeyboardEvent(var1, true)) {
- return;
- }
-
- if (var2 != null && !this.viewExcludedFromModalSession(var2)) {
- var2.keyDown(var1);
- return;
- }
-
- this.application().keyDown(var1);
- }
-
- }
-
- void _keyUp(KeyEvent var1) {
- View var2 = this._focusedView;
- if (var2 != null && !this.viewExcludedFromModalSession(var2)) {
- var2.keyUp(var1);
- } else {
- this.application().keyUp(var1);
- }
- }
-
- public void showColorChooser() {
- this.colorChooser().show();
- }
-
- public ColorChooser colorChooser() {
- if (this.colorChooser == null) {
- InternalWindow var1 = new InternalWindow(0, 0, 10, 10);
- var1.setRootView(this);
- this.colorChooser = new ColorChooser();
- this.colorChooser.setWindow(var1);
- var1.center();
- }
-
- return this.colorChooser;
- }
-
- public void showFontChooser() {
- this.fontChooser().show();
- }
-
- public FontChooser fontChooser() {
- if (this.fontChooser == null) {
- InternalWindow var1 = new InternalWindow(0, 0, 1, 1);
- var1.setRootView(this);
- this.fontChooser = new FontChooser();
- this.fontChooser.setWindow(var1);
- var1.center();
- }
-
- return this.fontChooser;
- }
-
- public ExternalWindow externalWindow() {
- for(Object var1 = this.panel; var1 != null; var1 = ((Component)var1).getParent()) {
- if (var1 instanceof FoundationFrame) {
- return ((FoundationFrame)var1).externalWindow;
- }
-
- if (var1 instanceof FoundationDialog) {
- return ((FoundationDialog)var1).externalWindow;
- }
-
- if (var1 instanceof FoundationWindow) {
- return ((FoundationWindow)var1).externalWindow;
- }
- }
-
- return null;
- }
-
- MouseEvent removeMouseEvents(MouseEvent var1) {
- MouseEvent var2 = (MouseEvent)this.application.eventLoop().filterEvents(this.mouseFilter);
- return var2 != null ? var2 : var1;
- }
-
- void _convertMouseEventToMouseView(MouseEvent var1) {
- if (this._mouseView != null && var1 != null) {
- Point var2 = Point.newPoint();
- ((View)this).convertToView(this._mouseView, var1.x, var1.y, var2);
- var1.x = var2.x;
- var1.y = var2.y;
- Point.returnPoint(var2);
- }
- }
-
- public void processEvent(Event var1) {
- if (this.application != null) {
- if (var1 instanceof MouseEvent) {
- MouseEvent var2 = (MouseEvent)var1;
- int var3 = var2.type;
- if (var3 == -5 && this.mouseDownCount > 0 && this._mouseView != null) {
- MouseEvent var4 = ((View)this).convertEventToView(this._mouseView, var2);
- ((Event)var4).setType(-3);
- this._mouseUp(var4);
- }
-
- if (var3 == -2 && this._mouseView != null && this._mouseView.wantsMouseEventCoalescing()) {
- var2 = this.removeMouseEvents(var2);
- var3 = ((Event)var2).type();
- } else if (var3 == -5 && this._moveView != null && this._moveView.wantsMouseEventCoalescing()) {
- var2 = this.removeMouseEvents(var2);
- var3 = ((Event)var2).type();
- }
-
- this._mouseX = var2.x;
- this._mouseY = var2.y;
- switch (var3) {
- case -6:
- if (this._mouseView == null) {
- this._mouseExit(var2);
- return;
- }
- break;
- case -5:
- this._mouseMove(var2);
- return;
- case -4:
- if (this._mouseView == null) {
- this._mouseEnter(var2);
- return;
- }
- break;
- case -3:
- this._convertMouseEventToMouseView(var2);
- this._mouseUp(var2);
- return;
- case -2:
- this._convertMouseEventToMouseView(var2);
- this._mouseDrag(var2);
- return;
- case -1:
- if (this.application.firstRootView() != this) {
- this.application.makeFirstRootView(this);
- }
-
- this._mouseDown(var2);
- return;
- }
- } else {
- if (var1 instanceof KeyEvent) {
- KeyEvent var9 = (KeyEvent)var1;
- if (this.application.firstRootView() != this) {
- this.application.makeFirstRootView(this);
- }
-
- if (var9.type == -11) {
- this._keyDown(var9);
- return;
- }
-
- this._keyUp(var9);
- return;
- }
-
- if (var1 instanceof ApplicationEvent) {
- ExternalWindow var6 = null;
- switch (var1.type) {
- case -28:
- this.print((ApplicationEvent)var1);
- return;
- case -27:
- case -26:
- case -25:
- default:
- break;
- case -24:
- if (!((View)this).bounds().equals(((ApplicationEvent)var1).rect()) && ((View)this).bounds().contains(((ApplicationEvent)var1).rect())) {
- ApplicationEvent var5 = new ApplicationEvent();
- var5.data = ((ApplicationEvent)var1).rect();
- var5.type = -23;
- ((Event)var5).setProcessor(this);
- if (this.application() != null && this.application().eventLoop() != null) {
- this.application().eventLoop().addEvent(var5);
- }
- }
-
- this.resize((ApplicationEvent)var1);
- var6 = this.externalWindow();
- if (var6 != null) {
- var6.validateBounds();
- return;
- }
- break;
- case -23:
- if (this.isVisible) {
- this.paint((ApplicationEvent)var1);
- return;
- }
- break;
- case -22:
- var6 = this.externalWindow();
- if (var6 != null) {
- var6.didResignMain();
- }
-
- if (this._mainWindow != null) {
- this._setMainWindow((InternalWindow)null);
- }
-
- if (this._focusedView != null) {
- this._focusedView._pauseFocus();
- return;
- }
- break;
- case -21:
- this.application.makeFirstRootView(this);
- if (var6 != null) {
- var6.didBecomeMain();
- }
-
- if (this._focusedView != null) {
- this._focusedView.resumeFocus();
- return;
- }
- }
- }
- }
-
- }
- }
-
- void setFocusedView(View var1, boolean var2) {
- if (var1 != this._focusedView) {
- if (this._focusedView != null) {
- View var3 = this._focusedView;
- this._focusedView = null;
- if (var2) {
- var3._stopFocus();
- } else {
- var3._pauseFocus();
- }
- } else {
- this._focusedView = null;
- }
-
- if (this._focusedView == null) {
- this._focusedView = var1;
- if (this._focusedView != null) {
- this._focusedView._startFocus();
- }
- }
-
- Application.application().focusChanged(this._focusedView);
- Application.application().performCommandLater(this, "validateSelectedView", (Object)null, true);
- }
-
- }
-
- public void setFocusedView(View var1) {
- this.setFocusedView(var1, true);
- }
-
- public View focusedView() {
- return this._focusedView;
- }
-
- public void performCommand(String var1, Object var2) {
- if ("showFontChooser".equals(var1)) {
- this.showFontChooser();
- } else if ("showColorChooser".equals(var1)) {
- this.showColorChooser();
- } else if ("newFontSelection".equals(var1)) {
- if (this.fontChooser != null) {
- this.fontChooser.setFont((Font)var2);
- }
- } else if ("validateSelectedView".equals(var1)) {
- this.validateSelectedView();
- } else {
- throw new NoSuchMethodError("unknown command: " + var1);
- }
- }
-
- public boolean canPerformCommand(String var1) {
- return _commands.contains(var1);
- }
-
- public void setColor(Color var1) {
- this._backgroundColor = var1;
- }
-
- public Color color() {
- return this._backgroundColor;
- }
-
- public void setImage(Image var1) {
- this._image = var1;
- }
-
- public Image image() {
- return this._image;
- }
-
- public void setImageDisplayStyle(int var1) {
- if (var1 != 0 && var1 != 2 && var1 != 1) {
- throw new InconsistencyException("Unknown image display style: " + var1);
- } else {
- this._imageDisplayStyle = var1;
- }
- }
-
- public int imageDisplayStyle() {
- return this._imageDisplayStyle;
- }
-
- public boolean isTransparent() {
- return false;
- }
-
- public void drawView(Graphics var1) {
- if ((this._image == null || this._imageDisplayStyle == 0 && (this._image.width() < super.bounds.width || this._image.height() < super.bounds.height)) && this._backgroundColor != null) {
- var1.setColor(this._backgroundColor);
- var1.fillRect(var1.clipRect());
- }
-
- if (this._image != null) {
- this._image.drawWithStyle(var1, 0, 0, super.bounds.width, super.bounds.height, this._imageDisplayStyle);
- }
-
- }
-
- public void draw(Graphics var1, Rect var2) {
- Vector var4 = new Vector();
- int var5 = this.windows.count();
-
- while(var5-- > 0) {
- InternalWindow var3 = (InternalWindow)this.windows.elementAt(var5);
- if (((View)var3).isDrawingEnabled()) {
- ((View)var3).disableDrawing();
- var4.addElement(var3);
- }
- }
-
- super.draw(var1, var2);
- var5 = var4.count();
-
- while(var5-- > 0) {
- InternalWindow var6 = (InternalWindow)var4.elementAt(var5);
- ((View)var6).reenableDrawing();
- }
-
- }
-
- View viewWithBuffer(View var1, Rect var2) {
- Object var5 = null;
- int var6 = var1.subviewCount();
- if (var6 == 0) {
- return null;
- } else {
- Vector var8 = var1.subviews();
- Rect var7 = Rect.newRect(0, 0, var2.width, var2.height);
-
- while(var6-- > 0) {
- View var3 = (View)var8.elementAt(var6);
- if (!(var3 instanceof InternalWindow) && var3.bounds.contains(var2)) {
- if (var3.isBuffered()) {
- Rect.returnRect(var7);
- return var3;
- }
-
- var3.isTransparent();
- var7.x = var2.x - var3.bounds.x;
- var7.y = var2.y - var3.bounds.y;
- View var4 = this.viewWithBuffer(var3, var7);
- if (var4 != null) {
- Rect.returnRect(var7);
- return var4;
- }
-
- if (var5 != null) {
- Rect.returnRect(var7);
- return (View)var5;
- }
- }
- }
-
- Rect.returnRect(var7);
- return null;
- }
- }
-
- void redraw(Graphics var1, Rect var2) {
- Rect var9 = Rect.newRect(0, 0, var2.width, var2.height);
- if (var2 == null) {
- var2 = new Rect(0, 0, super.bounds.width, super.bounds.height);
- }
-
- Vector var5 = VectorCache.newVector();
- this.setRedrawTransparentWindows(false);
- int var7 = this.windows.count();
- boolean var8 = false;
- int var6 = var7;
-
- while(var6-- > 0 && !var8) {
- InternalWindow var3 = (InternalWindow)this.windows.elementAt(var6);
- Rect var10 = this.absoluteWindowBounds(var3);
- if (var10.intersects(var2)) {
- var5.addElement(var3);
- if (!var3.isTransparent() && var10.contains(var2)) {
- var8 = true;
- }
- }
- }
-
- if (!var8) {
- View var4 = ((View)this)._viewForRect(var2, (View)null);
- if (var4 != null) {
- ((View)this).convertRectToView(var4, var2, var9);
- var1.pushState();
- var1.translate(var2.x - var9.x, var2.y - var9.y);
- var4.draw(var1, var9);
- var1.popState();
- } else {
- this.draw(var1, var2);
- }
- }
-
- var7 = var5.count();
-
- for(int var13 = 0; var13 < var7; ++var13) {
- InternalWindow var11 = (InternalWindow)var5.elementAt(var13);
- View var15 = ((View)var11).superview();
- ((View)this).convertRectToView(var15, var2, var9);
- Object var12 = ((View)var11)._viewForRect(var9, var15);
- if (var12 == null) {
- var12 = var11;
- }
-
- ((View)this).convertRectToView((View)var12, var2, var9);
- var1.pushState();
- var1.translate(var2.x - var9.x, var2.y - var9.y);
- ((View)var12).draw(var1, var9);
- var1.popState();
- }
-
- this.setRedrawTransparentWindows(true);
- Rect.returnRect(var9);
- VectorCache.returnVector(var5);
- }
-
- public void redraw(Rect var1) {
- Graphics var2 = ((View)this).createGraphics();
- this.redraw(var2, var1);
- var2.dispose();
- }
-
- void redraw() {
- Graphics var1 = ((View)this).createGraphics();
- Rect var2 = Rect.newRect(0, 0, super.bounds.width, super.bounds.height);
- this.redraw(var1, var2);
- Rect.returnRect(var2);
- var1.dispose();
- }
-
- synchronized void markDirty(View var1) {
- if (this.dirtyViews != null) {
- this.dirtyViews.addElement(var1);
- } else {
- throw new InconsistencyException("Don't dirty a View while the list of dirty views is being drawn!");
- }
- }
-
- synchronized void markClean(View var1) {
- if (this.dirtyViews != null) {
- this.dirtyViews.removeElement(var1);
- }
-
- }
-
- public synchronized void resetDirtyViews() {
- Vector var4 = this.dirtyViews;
- this.dirtyViews = null;
- int var2 = var4.count();
-
- for(int var1 = 0; var1 < var2; ++var1) {
- View var3 = (View)var4.elementAt(var1);
- var3.setDirty(false);
- }
-
- var4.removeAllElements();
- this.dirtyViews = var4;
- }
-
- public synchronized void drawDirtyViews() {
- int var2 = this.dirtyViews.count();
- if (var2 != 0) {
- Vector var5 = this.dirtyViews;
-
- try {
- this.dirtyViews = null;
- Vector var4 = new Vector(var2);
- Rect var3 = new Rect();
-
- for(int var1 = 0; var1 < var2; ++var1) {
- View var6 = (View)var5.elementAt(var1);
- this.collectDirtyViews(var6, var4, var3);
- }
-
- var2 = var4.count();
-
- for(int var11 = 0; var11 < var2; ++var11) {
- View var13 = (View)var4.elementAt(var11);
- var13.draw(var13.dirtyRect);
- }
- } finally {
- this.dirtyViews = var5;
- this.resetDirtyViews();
- }
-
- }
- }
-
- void collectDirtyViews(View var1, Vector var2, Rect var3) {
- View var9 = var1;
- View var8 = var1;
- int var6 = 0;
- int var4 = 0;
- int var7 = 0;
- int var5 = 0;
- var3.setBounds(0, 0, var1.width(), var1.height());
- if (var1.dirtyRect != null) {
- var3.intersectWith(var1.dirtyRect);
- }
-
- if (!var3.isEmpty()) {
- do {
- var4 += var8.bounds.x;
- var5 += var8.bounds.y;
- var3.moveBy(var8.bounds.x, var8.bounds.y);
- var8 = var8.superview();
- if (var8 != null) {
- var3.intersectWith(0, 0, var8.width(), var8.height());
- if (var3.isEmpty()) {
- return;
- }
-
- if (var8.isDirty()) {
- var9 = var8;
- var6 = var4;
- var7 = var5;
- }
- }
- } while(var8 != null && !(var8 instanceof InternalWindow));
-
- if (var1 != var9) {
- var3.moveBy(var6 - var4, var7 - var5);
- var9.addDirtyRect(var3);
- }
-
- if (!var2.containsIdentical(var9)) {
- var2.addElement(var9);
- }
-
- }
- }
-
- public boolean mouseDown(MouseEvent var1) {
- return false;
- }
-
- public RootView rootView() {
- return this.panel == null ? super.rootView() : this;
- }
-
- void setPanel(FoundationPanel var1) {
- this.panel = var1;
- }
-
- public FoundationPanel panel() {
- return this.panel;
- }
-
- Application application() {
- return this.application;
- }
-
- void setApplication(Application var1) {
- this.application = var1;
- }
-
- public void setWindowClipView(View var1) {
- this._windowClipView = var1;
- }
-
- public View windowClipView() {
- return this._windowClipView;
- }
-
- void addComponentView(AWTComponentView var1) {
- if (this.componentViews == null) {
- this.componentViews = new Vector();
- }
-
- this.componentViews.addElement(var1);
- var1.setComponentBounds();
- this.panel.add(var1.component);
- }
-
- void removeComponentView(AWTComponentView var1) {
- if (this.componentViews == null) {
- this.componentViews = new Vector();
- }
-
- this.componentViews.removeElement(var1);
- this.panel.remove(var1.component);
- }
-
- private final void subviewDidResizeOrMove(View var1) {
- if (this.componentViews != null) {
- int var3 = this.componentViews.count();
-
- for(int var4 = 0; var4 < var3; ++var4) {
- AWTComponentView var2 = (AWTComponentView)this.componentViews.elementAt(var4);
- if (((View)var2).descendsFrom(var1)) {
- var2.setComponentBounds();
- }
- }
- }
-
- this.createMouseEnterLater();
- if (this.application != null) {
- KeyboardArrow var5 = this.application.keyboardArrow();
- View var6 = var5.view();
- if (var6 != null && var6.rootView() == this) {
- this.updateArrowLocation(var5);
- }
- }
-
- }
-
- public void subviewDidResize(View var1) {
- this.subviewDidResizeOrMove(var1);
- }
-
- public void subviewDidMove(View var1) {
- this.subviewDidResizeOrMove(var1);
- }
-
- public boolean canDraw() {
- return this.panel.getParent() == null ? false : this.isVisible;
- }
-
- public Point mousePoint() {
- return new Point(this._mouseX, this._mouseY);
- }
-
- public boolean viewExcludedFromModalSession(View var1) {
- if (var1 == null) {
- return true;
- } else {
- View var2 = Application.application().modalView();
- if (var2 != null && !var1.descendsFrom(var2)) {
- return !(var1 instanceof DragView) && !(var1 instanceof InternalWindow);
- } else {
- return false;
- }
- }
- }
-
- public void setRedrawAll(boolean var1) {
- this.redrawAll = var1;
- }
-
- public boolean redrawAll() {
- return this.redrawAll;
- }
-
- Rect absoluteWindowBounds(InternalWindow var1) {
- return ((View)var1).superview() != this ? ((View)var1).superview().convertRectToView(this, var1.bounds) : var1.bounds;
- }
-
- void viewHierarchyChanged() {
- if (this._focusedView != null && !this._focusedView.descendsFrom(this)) {
- this.setFocusedView((View)null);
- }
-
- Application.application().performCommandLater(this, "validateSelectedView", (Object)null, true);
- }
-
- private boolean isInWindow(View var1) {
- if (var1 == null) {
- return false;
- } else if (var1 instanceof InternalWindow) {
- return true;
- } else {
- View var2 = var1.superview();
-
- while(var2 != this) {
- if (var2 instanceof InternalWindow) {
- return true;
- }
-
- var2 = var2.superview();
- if (var2 == null) {
- return false;
- }
- }
-
- return false;
- }
- }
-
- public boolean mouseStillDown() {
- return this.mouseDownCount > 0;
- }
-
- View rootViewFocusedView() {
- if (this._rootViewFocusedView != null) {
- if (this._rootViewFocusedView.descendsFrom(this)) {
- return this._rootViewFocusedView;
- }
-
- this._rootViewFocusedView = null;
- }
-
- return null;
- }
-
- public void setDefaultSelectedView(View var1) {
- this._defaultSelectedView = var1;
- }
-
- public View defaultSelectedView() {
- return this._defaultSelectedView;
- }
-
- public void selectView(View var1, boolean var2) {
- View var3 = this.keyboardRootView();
- if ((this.application == null || this.application.isKeyboardUIEnabled()) && this._selectedView != var3 && this._selectedView != null) {
- if (var2) {
- this.setFocusedView((View)null);
- }
-
- if (this._focusedView == null && var1.canBecomeSelectedView() && var1.descendsFrom(var3)) {
- View var4 = var1.superview();
- if (var4 != var3) {
- do {
- if (var4.hidesSubviewsFromKeyboard()) {
- var1 = var4;
- }
-
- var4 = var4.superview();
- } while(var4 != var3);
- }
-
- this.makeSelectedView(var1);
- } else if (var3 instanceof RootView) {
- ((RootView)var3).setDefaultSelectedView(var1);
- } else {
- if (var3 instanceof InternalWindow) {
- ((InternalWindow)var3).setDefaultSelectedView(var1);
- }
-
- }
- }
- }
-
- public void selectViewAfter(View var1) {
- Object var2 = null;
- View var3 = this.findNextView(var1, this.keyboardRootView(), true);
- this.makeSelectedView(var3);
- }
-
- public void selectViewBefore(View var1) {
- Object var2 = null;
- View var3 = this.findNextView(var1, this.keyboardRootView(), false);
- this.makeSelectedView(var3);
- }
-
- void didBecomeFirstRootView() {
- ExternalWindow var1 = this.externalWindow();
- if (var1 != null) {
- var1.didBecomeMain();
- }
-
- if (this._focusedView != null) {
- this._focusedView._startFocus();
- Application.application().focusChanged(this._focusedView);
- }
-
- this.application.performCommandLater(this, "validateSelectedView", (Object)null, true);
- }
-
- void didResignFirstRootView() {
- ExternalWindow var1 = this.externalWindow();
- if (var1 != null) {
- var1.didResignMain();
- }
-
- if (this._mainWindow != null) {
- this._setMainWindow((InternalWindow)null);
- }
-
- if (this._focusedView != null) {
- this._focusedView._pauseFocus();
- }
-
- this.application.performCommandLater(this, "validateSelectedView", (Object)null, true);
- }
-
- void makeSelectedView(View var1) {
- if (this.application != null && this.application.isKeyboardUIEnabled()) {
- View var2 = this.keyboardRootView();
- if (var1 != this._selectedView) {
- if (this._selectedView != null) {
- this._selectedView.willBecomeUnselected();
- this._selectedView = null;
- }
-
- this._selectedView = var1;
- if (this._selectedView != null) {
- if (var2 instanceof RootView) {
- ((RootView)var2).setDefaultSelectedView(this._selectedView);
- } else if (var2 instanceof InternalWindow) {
- ((InternalWindow)var2).setDefaultSelectedView(this._selectedView);
- }
-
- this._selectedView.scrollRectToVisible(new Rect(0, 0, this._selectedView.width(), this._selectedView.height()));
- this._selectedView.willBecomeSelected();
- }
-
- this.validateKeyboardArrow();
- }
- }
-
- }
-
- void validateKeyboardArrow() {
- if (this.application != null && this.application.isKeyboardUIEnabled()) {
- Object var1 = null;
- View var2;
- if (this._selectedView != null && this._selectedView.wantsKeyboardArrow()) {
- var2 = this._selectedView;
- } else if (this._focusedView != null && this._focusedView.canBecomeSelectedView() && this._focusedView.wantsKeyboardArrow()) {
- var2 = this._focusedView;
- } else {
- var2 = null;
- }
-
- if (var2 != null) {
- this.showKeyboardArrowForView(var2);
- return;
- }
-
- this.hideKeyboardArrow();
- }
-
- }
-
- void validateSelectedView() {
- if (this.application == null || this.application.isKeyboardUIEnabled()) {
- if (this._focusedView == null && (this.application == null || this.application.firstRootView() == this)) {
- View var1 = this.keyboardRootView();
- if (this._selectedView != null && this._selectedView.descendsFrom(var1)) {
- boolean var3 = false;
- if (!(this._selectedView instanceof InternalWindow) && !(this._selectedView instanceof RootView) || this._selectedView == var1) {
- if (this._selectedView != var1) {
- for(View var4 = this._selectedView.superview(); var4 != null && var4 != var1; var4 = var4.superview()) {
- if (var4.hidesSubviewsFromKeyboard()) {
- var3 = true;
- break;
- }
- }
- }
-
- if (!var3) {
- return;
- }
-
- this.makeSelectedView((View)null);
- }
- }
-
- View var2;
- if (var1 instanceof RootView) {
- var2 = ((RootView)var1).defaultSelectedView();
- } else if (var1 instanceof InternalWindow) {
- var2 = ((InternalWindow)var1).defaultSelectedView();
- } else {
- var2 = null;
- }
-
- if (var2 != null && var2.descendsFrom(var1)) {
- this.makeSelectedView(var2);
- } else {
- this.selectNextSelectableView();
- }
- } else if (this._selectedView != null) {
- this.makeSelectedView((View)null);
- }
-
- this.validateKeyboardArrow();
- }
- }
-
- void selectNextSelectableView() {
- View var1 = this.keyboardRootView();
- Object var2 = null;
- View var3;
- if (this._selectedView != null && this._selectedView.descendsFrom(var1)) {
- var3 = this.findNextView(this._selectedView, var1, true);
- } else {
- var3 = this.findNextView((View)null, var1, true);
- }
-
- this.makeSelectedView(var3);
- }
-
- void selectPreviousSelectableView() {
- View var1 = this.keyboardRootView();
- Object var2 = null;
- View var3;
- if (this._selectedView != null && this._selectedView.descendsFrom(var1)) {
- var3 = this.findNextView(this._selectedView, var1, false);
- } else {
- var3 = this.findNextView((View)null, var1, false);
- }
-
- this.makeSelectedView(var3);
- }
-
- boolean processKeyboardEvent(KeyEvent var1, boolean var2) {
- if ((this.application == null || this.application.isKeyboardUIEnabled()) && ((View)this).subviews().count() != 0) {
- if (var2 && !var1.isControlKeyDown()) {
- return false;
- } else if (!var2 && var1.isControlKeyDown()) {
- return false;
- } else {
- View var4 = this.keyboardRootView();
- this.validateSelectedView();
- if (var2 || !var1.isTabKey() && !var1.isBackTabKey()) {
- KeyStroke var5 = new KeyStroke(var1);
- if (this._selectedView != null) {
- if (this._selectedView.performCommandForKeyStroke(var5, 0)) {
- return true;
- }
-
- if (this._selectedView != var4) {
- for(View var3 = this._selectedView.superview(); var3 != var4; var3 = var3.superview()) {
- if (var3.performCommandForKeyStroke(var5, 1)) {
- return true;
- }
- }
- }
- }
-
- View var6 = var4;
-
- do {
- var6 = this.nextView(var6, var4, true, true, false);
- if (var6.performCommandForKeyStroke(var5, 1)) {
- return true;
- }
- } while(var6 != var4);
-
- Object var7 = this;
-
- do {
- var7 = this.nextView((View)var7, this, true, true, true);
- if (((View)var7).performCommandForKeyStroke(var5, 2)) {
- return true;
- }
- } while(var7 != this);
-
- return false;
- } else {
- if (var1.isBackTabKey()) {
- this.selectPreviousSelectableView();
- } else {
- this.selectNextSelectableView();
- }
-
- return true;
- }
- }
- } else {
- return false;
- }
- }
-
- private View nextView(View var1, View var2, boolean var3, boolean var4, boolean var5) {
- Object var6 = null;
- if (var1 == var2 && var3) {
- Vector var10 = var2.subviews();
- if (var10.count() > 0) {
- return var4 ? var2.firstSubview() : var2.lastSubview();
- } else {
- return null;
- }
- } else if (var3 && (!var1.hidesSubviewsFromKeyboard() || var5 && var1 instanceof InternalWindow) && var1.subviews().count() > 0) {
- return var4 ? var1.firstSubview() : var1.lastSubview();
- } else {
- View var7 = var1.superview();
- if (var4) {
- View var8 = var7.viewAfter(var1);
- if (var8 != null) {
- return var8;
- }
- } else {
- View var9 = var7.viewBefore(var1);
- if (var9 != null) {
- return var9;
- }
- }
-
- return var7 == var2 ? var2 : this.nextView(var7, var2, false, var4, var5);
- }
- }
-
- private View findNextView(View var1, View var2, boolean var3) {
- if (var2 == null) {
- return null;
- } else if (var1 == null) {
- return var2;
- } else {
- View var5 = var1;
- View var4 = var1;
-
- do {
- var4 = this.nextView(var4, var2, true, var3, false);
- } while(var4 != null && var4 != var5 && !var4.canBecomeSelectedView());
-
- return var4;
- }
- }
-
- private View keyboardRootView() {
- View var1 = Application.application().modalView();
- if (var1 != null && var1.isInViewHierarchy()) {
- return var1;
- } else {
- InternalWindow var2 = this.mainWindow();
- if (var2 != null) {
- return (View)var2;
- } else {
- return this.application != null && this.application.firstRootView() != null ? this.application.firstRootView() : this;
- }
- }
- }
-
- void showKeyboardArrowForView(View var1) {
- if (this.application != null) {
- KeyboardArrow var2 = this.application.keyboardArrow();
- if (var2.view() == var1) {
- return;
- }
-
- ((InternalWindow)var2).setRootView(this);
- var2.setView(var1);
- this.updateArrowLocation(var2);
- ((InternalWindow)var2).show();
- }
-
- }
-
- void updateArrowLocation(KeyboardArrow var1) {
- View var2 = var1.view();
- int var3 = this.application.keyboardArrowPosition(var2);
- Image var4 = this.application.keyboardArrowImage(var3);
- Point var5 = this.application.keyboardArrowHotSpot(var3);
- Point var6 = this.application.keyboardArrowLocation(var2, var3);
- var6.x -= var5.x;
- var6.y -= var5.y;
- if (this.windowClipView() != null) {
- ((View)this).convertPointToView(this.windowClipView(), var6, var6);
- }
-
- var1.setImage(var4);
- ((View)var1).moveTo(var6.x, var6.y);
- }
-
- void hideKeyboardArrow() {
- if (this.application != null) {
- KeyboardArrow var1 = this.application.keyboardArrow();
- if (((View)var1).rootView() == this) {
- ((InternalWindow)var1).hide();
- ((InternalWindow)var1).setRootView((RootView)null);
- var1.setView((View)null);
- }
- }
-
- }
-
- public boolean canBecomeSelectedView() {
- return true;
- }
-
- boolean wantsKeyboardArrow() {
- return false;
- }
-
- static {
- _commands.addElement("showFontChooser");
- _commands.addElement("showColorChooser");
- _commands.addElement("newFontSelection");
- _commands.addElement("validateSelectedView");
- }
- }
-