本文整理汇总了Java中javax.swing.JTabbedPane.RIGHT属性的典型用法代码示例。如果您正苦于以下问题:Java JTabbedPane.RIGHT属性的具体用法?Java JTabbedPane.RIGHT怎么用?Java JTabbedPane.RIGHT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类javax.swing.JTabbedPane
的用法示例。
在下文中一共展示了JTabbedPane.RIGHT属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: store
protected boolean store() {
prefs.putBoolean(WinSysPrefs.EDITOR_CLOSE_ACTIVATES_RECENT, isCloseActivatesMostRecentDocument.isSelected());
prefs.putBoolean(WinSysPrefs.OPEN_DOCUMENTS_NEXT_TO_ACTIVE_TAB, isNewDocumentOpensNextToActiveTab.isSelected());
boolean needsWinsysRefresh = false;
needsWinsysRefresh = checkMultiRow.isSelected() != defMultiRow;
prefs.putBoolean(WinSysPrefs.DOCUMENT_TABS_MULTIROW, checkMultiRow.isSelected());
int tabPlacement = JTabbedPane.TOP;
if( radioBottom.isSelected() )
tabPlacement = JTabbedPane.BOTTOM;
else if( radioLeft.isSelected() )
tabPlacement = JTabbedPane.LEFT;
else if( radioRight.isSelected() )
tabPlacement = JTabbedPane.RIGHT;
prefs.putInt( WinSysPrefs.DOCUMENT_TABS_PLACEMENT, tabPlacement );
needsWinsysRefresh |= tabPlacement != defTabPlacement;
return needsWinsysRefresh;
}
示例2: getSimpleTabsPlacement
/**
* Defines the tab placement. The possible bundle values are <code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code>.
* @return Tab placement when JTabbedPane implementation of Tab Control is
* being used. The return value is one of <code>JTabbedPane.TOP</code> (default), <code>JTabbedPane.BOTTOM</code>,
* <code>JTabbedPane.LEFT</code>, <code>JTabbedPane.RIGHT</code>.
*
* @see JTabbedPane#getTabPlacement()
*
* @since 2.44
*/
public static int getSimpleTabsPlacement() {
int result = JTabbedPane.TOP;
try {
String resValue = NbBundle.getMessage(Switches.class, "WinSys.TabControl.SimpleTabs.Placement" ); //NOI18N
if( "bottom".equals( resValue ) )
result = JTabbedPane.BOTTOM;
else if( "right".equals( resValue ) )
result = JTabbedPane.RIGHT;
else if( "left".equals( resValue ) )
result = JTabbedPane.LEFT;
} catch( MissingResourceException mrE ) {
//ignore
}
return result;
}
示例3: store
boolean store() {
boolean changed = false;
int placement = JTabbedPane.TOP;
if( radioPlacementBottom.isSelected() ) {
placement = JTabbedPane.BOTTOM;
} else if( radioPlacementLeft.isSelected() ) {
placement = JTabbedPane.LEFT;
} else if( radioPlacementRight.isSelected() ) {
placement = JTabbedPane.RIGHT;
}
changed |= settings.setTabsLocation( placement );
changed |= settings.setShowFullPath( checkShowFullPath.isSelected() );
changed |= settings.setSameProjectSameColor( checkProjectColors.isSelected() );
int rowCount = 1;
if( checkMultiRow.isSelected() && radioRowCount.isSelected() )
rowCount = ((Number)spinRowCount.getValue()).intValue();
changed |= settings.setRowCount( rowCount );
changed |= settings.setTabRowPerProject( radioRowPerProject.isSelected() && checkMultiRow.isSelected() );
changed |= settings.setShowFolderName( checkShowFolderName.isSelected() );
changed |= settings.setSortDocumentListByProject( checkSortDocumentList.isSelected() );
return changed;
}
示例4: load
protected void load() {
isCloseActivatesMostRecentDocument.setSelected(prefs.getBoolean(WinSysPrefs.EDITOR_CLOSE_ACTIVATES_RECENT, true));
isNewDocumentOpensNextToActiveTab.setSelected(prefs.getBoolean(WinSysPrefs.OPEN_DOCUMENTS_NEXT_TO_ACTIVE_TAB, false));
defMultiRow = prefs.getBoolean( WinSysPrefs.DOCUMENT_TABS_MULTIROW, false );
checkMultiRow.setSelected( defMultiRow );
defTabPlacement = prefs.getInt( WinSysPrefs.DOCUMENT_TABS_PLACEMENT, JTabbedPane.TOP );
switch( defTabPlacement ) {
case JTabbedPane.BOTTOM:
radioBottom.setSelected( true );
break;
case JTabbedPane.LEFT:
radioLeft.setSelected( true );
break;
case JTabbedPane.RIGHT:
radioRight.setSelected( true );
break;
default:
radioTop.setSelected( true );
}
if( isAquaLaF ) {
checkMultiRow.setSelected(false);
checkMultiRow.setEnabled(false);
radioLeft.setEnabled(false);
radioRight.setEnabled(false);
if( radioLeft.isSelected() || radioRight.isSelected() ) {
radioTop.setSelected(true);
}
}
}
示例5: fireChanged
private void fireChanged() {
boolean isChanged = false;
if (checkShowFolderName.isSelected() != settings.isShowFolderName()
|| checkShowFullPath.isSelected() != settings.isShowFullPath()
|| checkProjectColors.isSelected() != settings.isSameProjectSameColor()
|| checkSortDocumentList.isSelected() != settings.isSortDocumentListByProject()) {
isChanged = true;
}
int rowCount = settings.getRowCount();
if (checkMultiRow.isSelected() && radioRowCount.isSelected()) {
rowCount = ((Number) spinRowCount.getValue()).intValue();
}
if (checkMultiRow.isSelected() != (rowCount > 1 || settings.isTabRowPerProject())) {
isChanged = true;
}
if (rowCount != settings.getRowCount()) {
isChanged = true;
}
if (radioRowPerProject.isSelected() != settings.isTabRowPerProject()) {
isChanged = true;
}
if(radioPlacementBottom.isSelected() && settings.getTabsLocation() != JTabbedPane.BOTTOM
|| radioPlacementLeft.isSelected() && settings.getTabsLocation() != JTabbedPane.LEFT
|| radioPlacementRight.isSelected() && settings.getTabsLocation() != JTabbedPane.RIGHT
|| radioPlacementTop.isSelected() && settings.getTabsLocation() != JTabbedPane.TOP) {
isChanged = true;
}
controller.changed(null, isChanged);
}
示例6: load
void load() {
ProjectSupport projectSupport = ProjectSupport.getDefault();
switch( settings.getTabsLocation() ) {
case JTabbedPane.LEFT:
radioPlacementLeft.setSelected( true );
break;
case JTabbedPane.RIGHT:
radioPlacementRight.setSelected( true );
break;
case JTabbedPane.BOTTOM:
radioPlacementBottom.setSelected( true );
break;
default:
radioPlacementTop.setSelected( true );
}
checkShowFolderName.setSelected( settings.isShowFolderName() );
checkShowFullPath.setSelected( settings.isShowFullPath() );
checkProjectColors.setSelected( settings.isSameProjectSameColor() );
checkSortDocumentList.setSelected( settings.isSortDocumentListByProject() );
int rowCount = settings.getRowCount();
checkMultiRow.setSelected( rowCount > 1 || settings.isTabRowPerProject() );
if( rowCount > 1 )
spinRowCount.getModel().setValue( Integer.valueOf( rowCount ) );
radioRowPerProject.setSelected( settings.isTabRowPerProject() );
radioRowCount.setSelected( rowCount > 1 );
radioRowPerProject.setVisible( projectSupport.isEnabled() );
checkProjectColors.setVisible( projectSupport.isEnabled() );
checkSortDocumentList.setVisible( projectSupport.isEnabled() );
enableControls();
}
示例7: TabContainer
TabContainer( TabbedImpl tabbedImpl, TabDisplayer tabDisplayer, int orientation ) {
super( new BorderLayout(0, 0) );
this.tabbedImpl = tabbedImpl;
this.displayer = tabDisplayer;
tcPanel = new JPanel( layout );
add( tcPanel, BorderLayout.CENTER );
tabbedImpl.getSelectionModel().addChangeListener( this );
String lafId = UIManager.getLookAndFeel().getID();
if( "Nimbus".equals( lafId ) ) {
setBorder( new MatteBorder(1, 1, 1, 1, UIManager.getColor("nimbusBorder"))); //NOI18N
} else if( "Aqua".equals( lafId ) ) {
setBorder( BorderFactory.createEmptyBorder() );
} else {
setBorder( UIManager.getBorder( "Nb.ScrollPane.border" ) ); //NOI18N
}
switch( orientation ) {
case JTabbedPane.TOP:
add( displayer, BorderLayout.NORTH );
break;
case JTabbedPane.LEFT:
add( displayer, BorderLayout.WEST );
break;
case JTabbedPane.RIGHT:
add( displayer, BorderLayout.EAST );
break;
case JTabbedPane.BOTTOM:
add( displayer, BorderLayout.SOUTH );
break;
default:
throw new IllegalArgumentException( "Invalid orientation: " + orientation ); //NOI18N
}
stateChanged( null );
}
示例8: create
public static TabTableModel create( TabDataModel tabModel, int tabsLocation ) {
if( tabsLocation == JTabbedPane.LEFT || tabsLocation == JTabbedPane.RIGHT )
return new ColumnTableModel( tabModel );
return new RowTableModel( tabModel );
}