Recovers the official client's CreateChannelDialog layout so the widget set, labels and tab order match: name/icon/password/topic/description above Standard, Audio, Permissions and Advanced tabs. Core gains ChannelSettings (diffed against the original so channeledit only carries changed properties) and ChannelAdmin (channelinfo/edit, channel permissions, the server icon store). TeamspeakConnection now owns the event executor so it can drain queued notify events before reading a command's result, which channelpermlist needs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
28 lines
892 B
Java
28 lines
892 B
Java
package com.ts3client.ui;
|
|
|
|
import javax.swing.JSpinner;
|
|
import java.awt.Dimension;
|
|
|
|
/** Shared shaping for the numeric spinners the channel editor is full of. */
|
|
final class Spinners {
|
|
|
|
/** Width that fits a five-digit power without swallowing the rest of a form row. */
|
|
private static final int WIDTH = 80;
|
|
|
|
private Spinners() {
|
|
}
|
|
|
|
/**
|
|
* Keeps a spinner to a sensible width and drops the grouping separator: these hold
|
|
* permission powers and client counts, which TeamSpeak shows as plain numbers.
|
|
*/
|
|
static JSpinner compact(JSpinner spinner) {
|
|
JSpinner.NumberEditor editor = new JSpinner.NumberEditor(spinner, "#");
|
|
spinner.setEditor(editor);
|
|
Dimension size = new Dimension(WIDTH, spinner.getPreferredSize().height);
|
|
spinner.setPreferredSize(size);
|
|
spinner.setMaximumSize(size);
|
|
return spinner;
|
|
}
|
|
}
|