2 * ch.cyberduck.ui.cocoa.CDSplitView.java
5 * Copyright (c) 2002 David Kocher. All rights reserved.
6 * http://icu.unizh.ch/~dkocher/
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * Bug fixes, suggestions and comments should be sent to:
19 * dkocher@cyberduck.ch
21 package ch
.cyberduck
.ui
.cocoa
;
23 import com
.apple
.cocoa
.foundation
.*;
24 import com
.apple
.cocoa
.application
.*;
26 import org
.apache
.log4j
.Logger
;
28 public class CDSplitView
extends NSSplitView
{
30 private static Logger log
= Logger
.getLogger(CDSplitView
.class);
32 public NSView browserView
;
33 public NSView transferView
;
35 public CDSplitView() {
37 log
.debug("CDSplitView");
40 public CDSplitView(NSRect frameRect
) {
42 log
.debug("CDSplitView");
45 public boolean splitViewCanCollapseSubview( NSSplitView sender
, NSView subview
) {
46 log
.debug("CDSplitView:splitViewCanCollapseSubview");
50 public boolean canCollapseSubview(NSView subview
) {
51 log
.debug("CDSplitView:canCollapseSubview");
52 return (subview
== transferView
);
55 public void awakeFromNib() {
56 log
.debug("CDSplitView:awakeFromNib");
57 this.setDelegate(this);
58 this.setVertical(false);
59 this.addSubview(browserView
);
60 this.addSubview(transferView
);
61 //Adjusts the sizes of the receiver's subviews so they (plus the dividers) fill the receiver. The subviews are resized proportionally; the size of a subview relative to the other subviews doesn't change.
62 this.adjustSubviews();
65 // Returns the thickness of the divider. You can subclass NSSplitView and override this method to change the divider's size, if necessary.
66 // public float dividerThickness()