1 19 20 21 package org.netbeans.core.windows.view.ui; 22 23 24 import org.openide.windows.TopComponent; 25 26 import javax.swing.*; 27 import javax.swing.event.ChangeListener ; 28 import java.awt.*; 29 import java.awt.event.ActionListener ; 30 31 32 38 public interface Tabbed { 39 40 public void requestAttention(TopComponent tc); 41 42 public void cancelRequestAttention(TopComponent tc); 43 44 public void addTopComponent(String name, Icon icon, TopComponent tc, String toolTip); 45 46 public void insertComponent(String name, Icon icon, Component comp, String toolTip, int position); 47 48 public void setTopComponents(TopComponent[] tcs, TopComponent selected); 49 50 public int getTabCount(); 51 52 public TopComponent[] getTopComponents(); 53 54 public TopComponent getTopComponentAt(int index); 55 56 public int indexOf(Component tc); 57 58 public void removeComponent(Component comp); 59 60 public void setTitleAt(int index, String title); 61 62 public void setIconAt(int index, Icon icon); 63 64 public void setToolTipTextAt(int index, String toolTip); 65 66 public void setSelectedComponent(Component comp); 67 68 public TopComponent getSelectedTopComponent(); 69 70 public void addChangeListener(ChangeListener listener); 71 72 public void removeChangeListener(ChangeListener listener); 73 74 public void addActionListener (ActionListener al); 75 76 public void removeActionListener (ActionListener al); 77 78 public void setActive(boolean active); 79 80 public int tabForCoordinate(Point p); 81 82 public Shape getIndicationForLocation(Point location, TopComponent startingTransfer, 83 Point startingPoint, boolean attachingPossible); 84 85 public Object getConstraintForLocation(Point location, boolean attachingPossible); 86 87 public Image createImageOfTab (int tabIndex); 88 89 90 public Component getComponent(); 91 92 95 public Action[] getPopupActions(Action[] defaultActions, int tabIndex); 96 97 98 public Rectangle getTabBounds(int tabIndex); 99 100 101 public interface Accessor { 102 103 public Tabbed getTabbed (); 104 105 } 107 } 108 109 | Popular Tags |