Changeset 1763


Ignore:
Timestamp:
11/08/06 16:46:20 (13 years ago)
Author:
curtis
Message:

Add methods for disabling individual panel placement arrows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/util/BreakawayPanel.java

    r1432 r1763  
    5858  protected boolean autoSize; 
    5959 
     60  /** Arrow buttons. */ 
     61  protected BioArrowButton top, bottom, left, right; 
    6062 
    6163  // -- Constructor -- 
     
    7981    // up arrow button 
    8082    Dimension tallArrow = new Dimension(12, Integer.MAX_VALUE); 
    81     BioArrowButton top = new BioArrowButton(BioArrowButton.NORTH); 
     83    top = new BioArrowButton(BioArrowButton.NORTH); 
    8284    top.setActionCommand("Top"); 
    8385    top.addActionListener(this); 
     
    8688 
    8789    // down arrow button 
    88     BioArrowButton bottom = new BioArrowButton(BioArrowButton.SOUTH); 
     90    bottom = new BioArrowButton(BioArrowButton.SOUTH); 
    8991    bottom.setActionCommand("Bottom"); 
    9092    bottom.addActionListener(this); 
     
    9496    // left arrow button 
    9597    Dimension wideArrow = new Dimension(Integer.MAX_VALUE, 12); 
    96     BioArrowButton left = new BioArrowButton(BioArrowButton.WEST); 
     98    left = new BioArrowButton(BioArrowButton.WEST); 
    9799    left.setActionCommand("Left"); 
    98100    left.addActionListener(this); 
     
    101103 
    102104    // right arrow button 
    103     BioArrowButton right = new BioArrowButton(BioArrowButton.EAST); 
     105    right = new BioArrowButton(BioArrowButton.EAST); 
    104106    right.setActionCommand("Right"); 
    105107    right.addActionListener(this); 
     
    122124    window.getContentPane().add(this); 
    123125  } 
    124  
    125126 
    126127  // -- BreakawayPanel API methods -- 
     
    242243  } 
    243244 
     245  /** Toggles availability of up arrow button. */ 
     246  public void setUpEnabled(boolean enabled) { 
     247    top.setVisible(enabled); 
     248  } 
     249 
     250  /** Toggles availability of down arrow button. */ 
     251  public void setDownEnabled(boolean enabled) { 
     252    bottom.setVisible(enabled); 
     253  } 
     254 
     255  /** Toggles availability of left arrow button. */ 
     256  public void setLeftEnabled(boolean enabled) { 
     257    left.setVisible(enabled); 
     258  } 
     259 
     260  /** Toggles availability of right arrow button. */ 
     261  public void setRightEnabled(boolean enabled) { 
     262    right.setVisible(enabled); 
     263  } 
    244264 
    245265  // -- ActionListener API methods -- 
Note: See TracChangeset for help on using the changeset viewer.